-
-
Notifications
You must be signed in to change notification settings - Fork 266
/
eslint.config.js
46 lines (42 loc) · 1.16 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
import js from "@eslint/js";
import globals from "globals";
import stylistic from "@stylistic/eslint-plugin";
import importPlugin from "eslint-plugin-import";
export default [
js.configs.recommended,
importPlugin.flatConfigs.recommended,
stylistic.configs.customize({
arrowParens: true,
braceStyle: "1tbs",
commaDangle: "never",
flat: true,
jsx: false,
quotes: "double",
semi: true
}),
{
languageOptions: {
ecmaVersion: "latest",
globals: {
...globals.node
}
},
settings: {
"import/resolver": {
node: {}
}
},
rules: {
"no-unused-vars": ["error", { caughtErrorsIgnorePattern: "^_" }],
"no-empty-function": "off",
"no-console": ["error"],
// Imports
"import/extensions": ["error", "ignorePackages"],
"import/newline-after-import": ["error", { count: 2, exactCount: false, considerComments: true }],
// Stylistic
"@stylistic/yield-star-spacing": ["error", "after"],
"@stylistic/multiline-ternary": "off",
"@stylistic/no-multiple-empty-lines": ["error", { max: 2, maxEOF: 0, maxBOF: 0 }] // Allow max=2 for imports
}
}
];