@@ -2,39 +2,18 @@ import jsLint from "@eslint/js"
2
2
import stylistic from "@stylistic/eslint-plugin"
3
3
import globals from "globals"
4
4
import tsLint from "typescript-eslint"
5
- // const __filename = fileURLToPath(import.meta.url);
6
- // const __dirname = path.dirname(__filename);
7
- // const compat = new FlatCompat({
8
- // baseDirectory: __dirname,
9
- // recommendedConfig: js.configs.recommended,
10
- // allConfig: js.configs.all
11
- // });
12
5
13
6
export default [
14
7
// config parsers
15
8
{
16
- files : [ "src/*.{js,mjs,cjs,ts,mts,jsx,tsx}" ]
17
- } ,
18
-
19
- {
20
- files : [ "tests/*.{js,mjs,cjs,ts,mts,jsx,tsx}" ] ,
21
- languageOptions : {
22
- globals : {
23
- ...globals . browser ,
24
- ...globals . node ,
25
- ...globals . mocha ,
26
- ...globals . jest
27
- }
28
- }
29
- } ,
30
- // config envs
31
- {
9
+ files : [ "src/*.{js,mjs,cjs,ts,mts,jsx,tsx}" ] ,
32
10
languageOptions : {
33
11
globals : {
34
12
...globals . browser , ...globals . node
35
13
}
36
14
}
37
15
} ,
16
+
38
17
// syntax rules
39
18
jsLint . configs . recommended ,
40
19
...tsLint . configs . recommended ,
@@ -47,32 +26,36 @@ export default [
47
26
quotes : "double" ,
48
27
semi : false ,
49
28
commaDangle : "never"
50
- } )
51
- // {
52
- // ignores: [
53
- // "**/node_modules/",
54
- // "**/dist/",
55
- // "**/lib_cjs/",
56
- // "**/lib_es/",
57
- // "**/exampless/",
58
- // ],
59
- // },
60
- // ...compat.extends(
61
- // "eslint:recommended",
62
- // "plugin:@typescript-eslint/recommended",
63
- // ), {
64
- // plugins: {
65
- // "@typescript-eslint": typescriptEslint,
66
- // },
29
+ } ) ,
30
+ {
31
+ ignores : [
32
+ "**/node_modules/" ,
33
+ "**/coverage/" ,
34
+ "**/dist/" ,
35
+ "**/docs/" ,
36
+ "**/examples/" ,
37
+ "**/lib_cjs/" ,
38
+ "**/lib_es/"
39
+ ]
40
+ } ,
41
+ {
42
+ rules : {
43
+ // "@typescript-eslint/no-explicit-any": "off"
44
+ }
45
+ } ,
46
+ {
47
+ files : [ "tests/*.{js,mjs,cjs,ts,mts,jsx,tsx}" ] ,
48
+ languageOptions : {
49
+ globals : {
50
+ ...globals . browser ,
51
+ ...globals . node ,
52
+ ...globals . mocha ,
53
+ ...globals . jest
54
+ }
55
+ } ,
67
56
68
- // rules: {
69
- // "no-undef": "error",
70
- // "no-var": "error",
71
- // "prefer-const": "error",
72
- // "no-const-assign": "error",
73
- // "one-var": ["error", "never"],
74
- // "sort-imports": "off",
75
- // "no-control-regex": "off",
76
- // },
77
- // }
57
+ rules : {
58
+ "@typescript-eslint/no-explicit-any" : "off"
59
+ }
60
+ }
78
61
]
0 commit comments