Skip to content

Use flat config for eslint 9 #608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/started.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ npm install --save-dev eslint @intlify/eslint-plugin-vue-i18n

Use `eslint.config.[c|m]js` file to configure rules. This is the default in ESLint v9, but can be used starting from ESLint v8.57.0. See also: https://eslint.org/docs/latest/use/configure/configuration-files-new.

::: tip Requirements

If you're already toe-tipping and checking out v4.0.0, you should use `vueI18n.configs.recommended` instead of `vueI18n.configs["flat/recommended"]` in the following example.

:::

Example eslint.config.js:

```js
Expand All @@ -31,7 +37,7 @@ export default [
// js.configs.recommended, // '@eslint/js'
// ...vue.configs['flat/recommended'], // 'eslint-plugin-vue'

...vueI18n.configs.recommended,
...vueI18n.configs["flat/recommended"],
{
rules: {
// Optional.
Expand Down