Skip to content

Commit f624caf

Browse files
authored
Merge pull request #7857 from BacLuc/print-switch-to-flat-config
print: finish switch to flat eslint config
2 parents b349784 + 63f7576 commit f624caf

File tree

3 files changed

+11
-17
lines changed

3 files changed

+11
-17
lines changed

print/eslint.config.mjs

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,26 @@
11
import { includeIgnoreFile } from '@eslint/compat'
22
import localRules from 'eslint-plugin-local-rules'
3+
import vueEslint from 'eslint-plugin-vue'
4+
import vueScopedCssEslint from 'eslint-plugin-vue-scoped-css'
5+
import { createConfigForNuxt } from '@nuxt/eslint-config/flat'
6+
import prettierRecommended from 'eslint-plugin-prettier/recommended'
37
import globals from 'globals'
48
import path from 'node:path'
59
import { fileURLToPath } from 'node:url'
610
import js from '@eslint/js'
7-
import { FlatCompat } from '@eslint/eslintrc'
811

912
const __filename = fileURLToPath(import.meta.url)
1013
const __dirname = path.dirname(__filename)
11-
const compat = new FlatCompat({
12-
baseDirectory: __dirname,
13-
recommendedConfig: js.configs.recommended,
14-
allConfig: js.configs.all,
15-
})
1614
const gitignorePath = path.resolve(__dirname, '.gitignore')
1715

18-
export default [
16+
export default createConfigForNuxt().append([
1917
{
2018
files: ['**/*.ts'],
2119
},
22-
...compat.extends(
23-
'plugin:vue/vue3-recommended',
24-
'plugin:vue-scoped-css/vue3-recommended',
25-
'@nuxt/eslint-config',
26-
'eslint:recommended',
27-
'plugin:prettier/recommended'
28-
),
20+
...vueEslint.configs['flat/recommended'],
21+
...vueScopedCssEslint.configs['flat/recommended'],
22+
js.configs.recommended,
23+
prettierRecommended,
2924
{
3025
ignores: ['common/**/*', '.nuxt/', '.output/', 'coverage/'],
3126
},
@@ -45,6 +40,7 @@ export default [
4540
},
4641

4742
rules: {
43+
'import/first': 'off',
4844
'no-undef': 'off',
4945
'no-console': 'off',
5046
'prettier/prettier': 'error',
@@ -61,4 +57,4 @@ export default [
6157
],
6258
},
6359
},
64-
]
60+
])

print/package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

print/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
},
3333
"devDependencies": {
3434
"@eslint/compat": "1.3.1",
35-
"@eslint/eslintrc": "3.3.1",
3635
"@eslint/js": "9.32.0",
3736
"@nuxt/eslint": "1.7.1",
3837
"@nuxt/eslint-config": "0.7.6",

0 commit comments

Comments
 (0)