@@ -2,70 +2,66 @@ import mocha from 'eslint-plugin-mocha';
22import babel from '@babel/eslint-plugin' ;
33import globals from 'globals' ;
44import babelParser from '@babel/eslint-parser' ;
5- import path from 'node:path' ;
6- import { fileURLToPath } from 'node:url' ;
75import js from '@eslint/js' ;
8- import { FlatCompat } from '@eslint/eslintrc' ;
96
10- const __filename = fileURLToPath ( import . meta. url ) ;
11- const __dirname = path . dirname ( __filename ) ;
12- const compat = new FlatCompat ( {
13- baseDirectory : __dirname ,
14- recommendedConfig : js . configs . recommended ,
15- allConfig : js . configs . all
16- } ) ;
7+ export default [
8+ js . configs . recommended ,
9+ mocha . configs . recommended ,
10+ {
11+ ignores : [
12+ '**/.DS_Store' ,
13+ '**/_sass' ,
14+ '**/_site' ,
15+ '**/coverage' ,
16+ 'dist/*' ,
17+ '**/node_modules' ,
18+ '**/package-lock.json' ,
19+ 'packages/*/dist/*' ,
20+ '**/.env' ,
21+ '**/.env.*' ,
22+ '!**/.env.example' ,
23+ ] ,
24+ } ,
25+ {
26+ plugins : {
27+ '@babel' : babel ,
28+ } ,
1729
18- export default [ {
19- ignores : [
20- '**/.DS_Store' ,
21- '**/_sass' ,
22- '**/_site' ,
23- '**/coverage' ,
24- 'dist/*' ,
25- '**/node_modules' ,
26- '**/package-lock.json' ,
27- 'packages/*/dist/*' ,
28- '**/.env' ,
29- '**/.env.*' ,
30- '!**/.env.example' ,
31- ] ,
32- } , ...compat . extends ( 'eslint:recommended' , 'plugin:mocha/recommended' ) , {
33- plugins : {
34- mocha,
35- '@babel' : babel ,
36- } ,
30+ languageOptions : {
31+ globals : {
32+ ...globals . browser ,
33+ ...globals . node ,
34+ ...globals . jquery ,
35+ ...globals . amd ,
36+ ...globals . mocha ,
37+ __base : false ,
38+ expect : false ,
39+ } ,
3740
38- languageOptions : {
39- globals : {
40- ...globals . browser ,
41- ...globals . node ,
42- ...globals . jquery ,
43- ...globals . amd ,
44- ...globals . mocha ,
45- __base : false ,
46- expect : false ,
47- } ,
41+ parser : babelParser ,
42+ ecmaVersion : 6 ,
43+ sourceType : 'module' ,
4844
49- parser : babelParser ,
50- ecmaVersion : 6 ,
51- sourceType : 'module' ,
45+ parserOptions : {
46+ requireConfigFile : false ,
47+ } ,
48+ } ,
5249
53- parserOptions : {
54- requireConfigFile : false ,
55- } ,
56- } ,
50+ rules : {
51+ curly : 2 ,
52+ eqeqeq : [ 'error' , 'smart' ] ,
53+ quotes : [ 2 , 'single' , 'avoid-escape' ] ,
54+ semi : 2 ,
5755
58- rules : {
59- curly : 2 ,
60- eqeqeq : [ 'error' , 'smart' ] ,
61- quotes : [ 2 , 'single' , 'avoid-escape' ] ,
62- semi : 2 ,
56+ 'no-unused-vars' : [
57+ 'error' ,
58+ {
59+ caughtErrors : 'none' ,
60+ varsIgnorePattern : 'should|expect' ,
61+ } ,
62+ ] ,
6363
64- 'no-unused-vars' : [ 'error' , {
65- caughtErrors : 'none' ,
66- varsIgnorePattern : 'should|expect' ,
67- } ] ,
68-
69- 'mocha/no-mocha-arrows' : 0 ,
70- } ,
71- } ] ;
64+ 'mocha/no-mocha-arrows' : 0 ,
65+ } ,
66+ } ,
67+ ] ;
0 commit comments