-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.js
68 lines (66 loc) · 1.35 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import jsLint from "@eslint/js"
import stylistic from "@stylistic/eslint-plugin"
import tsDocLint from "eslint-plugin-tsdoc"
import globals from "globals"
import tsLint from "typescript-eslint"
export default [
// config parsers
{
files: ["src/*.{js,mjs,cjs,ts,mts,jsx,tsx}"],
languageOptions: {
globals: {
...globals.browser, ...globals.node
}
}
},
// syntax rules
jsLint.configs.recommended,
...tsLint.configs.recommended,
// code style rules
// disable legacy conflict rules about code style
stylistic.configs["disable-legacy"],
// you can customize or use a preset
stylistic.configs.customize({
indent: 2,
quotes: "double",
semi: false,
commaDangle: "never"
}),
{
ignores: [
"**/node_modules/",
"**/coverage/",
"**/dist/",
"**/docs/",
"**/examples/",
"**/lib_cjs/",
"**/lib_es/"
]
},
{
rules: {
// "@typescript-eslint/no-explicit-any": "off"
}
},
{
files: ["tests/*.{js,mjs,cjs,ts,mts,jsx,tsx}"],
languageOptions: {
globals: {
...globals.browser,
...globals.node,
...globals.mocha,
...globals.jest
}
},
rules: {
"@typescript-eslint/no-explicit-any": "off"
}
}, {
plugins: {
tsdoc: tsDocLint
},
rules: {
"tsdoc/syntax": "warn"
}
}
]