11import { includeIgnoreFile } from '@eslint/compat'
22import 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'
37import globals from 'globals'
48import path from 'node:path'
59import { fileURLToPath } from 'node:url'
610import js from '@eslint/js'
7- import { FlatCompat } from '@eslint/eslintrc'
811
912const __filename = fileURLToPath ( import . meta. url )
1013const __dirname = path . dirname ( __filename )
11- const compat = new FlatCompat ( {
12- baseDirectory : __dirname ,
13- recommendedConfig : js . configs . recommended ,
14- allConfig : js . configs . all ,
15- } )
1614const 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+ ] )
0 commit comments