-
Notifications
You must be signed in to change notification settings - Fork 153
Expand file tree
/
Copy patheslint.config.js
More file actions
73 lines (72 loc) · 2.36 KB
/
Copy patheslint.config.js
File metadata and controls
73 lines (72 loc) · 2.36 KB
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
69
70
71
72
73
const js = require("@eslint/js");
const compat = require("eslint-plugin-compat");
const globals = require("globals");
module.exports = [
{
ignores: ["**/lib/**"],
},
js.configs.recommended,
{
...compat.configs["flat/recommended"],
files: ["runbot/**/*.js"],
},
{
files: ["runbot/**/*.js"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.browser,
diff_match_patch: "readonly",
Chart: "readonly",
},
},
rules: {
"no-undef": ["error"],
"no-restricted-globals": ["error", "event", "self"],
"no-const-assign": ["error"],
"no-debugger": ["error"],
"no-dupe-class-members": ["error"],
"no-dupe-keys": ["error"],
"no-dupe-args": ["error"],
"no-dupe-else-if": ["error"],
"no-unsafe-negation": ["error"],
"no-duplicate-imports": ["error"],
"valid-typeof": ["error"],
"no-unused-vars": ["error", {
vars: "all",
args: "none",
ignoreRestSiblings: false,
caughtErrors: "all",
}],
curly: ["error", "all"],
"no-restricted-syntax": ["error", "PrivateIdentifier"],
"prefer-const": ["error", {
destructuring: "all",
ignoreReadBeforeAssign: true,
}],
"no-console": ["warn"],
"no-var": ["error"],
"arrow-body-style": ["error", "as-needed"],
"arrow-parens": ["error"],
"brace-style": ["error"],
"object-curly-spacing": ["error", "always"],
"array-bracket-spacing": ["error"],
"comma-dangle": ["error", "always-multiline"],
semi: ["error", "always"],
quotes: ["error", "double", { allowTemplateLiterals: true }],
indent: ["error", 4, { SwitchCase: 1 }],
"eol-last": ["error"],
"no-multiple-empty-lines": ["error"],
"no-trailing-spaces": ["error"],
},
},
{
files: ["eslint.config.js"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "commonjs",
globals: globals.node,
},
},
];