@@ -6,42 +6,40 @@ import * as eslintBabelParser from "@babel/eslint-parser"
66import * as nodePlugin from "eslint-plugin-node"
77import * as importPlugin from "eslint-plugin-import"
88import * as onlyWarnPlugin from "eslint-plugin-only-warn"
9- import * as optimizeRegexPlugin from "eslint-plugin-optimize-regex"
10- // import * as prettierPlugin from "eslint-plugin-prettier"
119
1210import js from "@eslint/js"
1311
14- export const jsConfig : Linter . FlatConfig = {
15- ...js . configs . recommended ,
16- // ...optimizeRegexPlugin.configs!.all,
17- // ...prettierPlugin.configs!.all,
18- files : [ "*.js" , "*.mjs" , "*.cjs" , "*.jsx" , "*.flow" ] ,
19- languageOptions : {
20- parser : eslintBabelParser ,
21- parserOptions : {
22- requireConfigFile : false ,
23- ecmaFeatures : {
24- jsx : true ,
12+ export const jsConfig : Linter . FlatConfig [ ] = [
13+ {
14+ ...js . configs . recommended ,
15+ files : [ "*.js" , "*.mjs" , "*.cjs" , "*.jsx" , "*.flow" ] ,
16+ languageOptions : {
17+ parser : eslintBabelParser ,
18+ parserOptions : {
19+ requireConfigFile : false ,
20+ ecmaFeatures : {
21+ jsx : true ,
22+ } ,
23+ babelOptions : {
24+ plugins : [ "@babel/plugin-syntax-flow" , "@babel/plugin-syntax-jsx" ] ,
25+ } ,
26+ ecmaVersion : "latest" as const ,
27+ sourceType : "module" as const ,
2528 } ,
26- babelOptions : {
27- plugins : [ "@babel/plugin-syntax-flow" , "@babel/plugin-syntax-jsx" ] ,
29+ globals : {
30+ atom : "readonly" ,
2831 } ,
29- ecmaVersion : "latest" as const ,
30- sourceType : "module" as const ,
3132 } ,
32- globals : {
33- atom : "readonly" ,
33+ plugins : {
34+ node : nodePlugin ,
35+ import : importPlugin ,
36+ "only-warn" : onlyWarnPlugin ,
37+ } ,
38+ rules : {
39+ ...eslintRulesExtra ,
40+ ...pluginNodeRules ,
41+ ...pluginImportRulesExtra ,
42+ ...importPlugin . configs . recommended . rules ,
3443 } ,
3544 } ,
36- plugins : {
37- node : nodePlugin ,
38- import : importPlugin ,
39- "only-warn" : onlyWarnPlugin ,
40- } ,
41- rules : {
42- ...eslintRulesExtra ,
43- ...pluginNodeRules ,
44- ...pluginImportRulesExtra ,
45- ...importPlugin . configs . recommended . rules ,
46- } ,
47- }
45+ ]
0 commit comments