forked from martingraham/CLMS-UI
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patheslint.config.mjs
More file actions
56 lines (54 loc) · 1.75 KB
/
Copy patheslint.config.mjs
File metadata and controls
56 lines (54 loc) · 1.75 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
import globals from "globals";
// globals v11 has entries with trailing whitespace; trim them for ESLint v10
function cleanGlobals(obj) {
return Object.fromEntries(Object.entries(obj).map(([k, v]) => [k.trim(), v]));
}
export default [
{
ignores: [
"vendor/**",
"js/align/bioseq32.js",
"js/svgexp.js",
"node_modules/**",
],
},
{
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...cleanGlobals(globals.browser),
...cleanGlobals(globals.node),
...cleanGlobals(globals.es2015),
Atomics: "readonly",
SharedArrayBuffer: "readonly",
},
},
rules: {
// From eslint:recommended (key rules)
"no-const-assign": "error",
"no-dupe-args": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-empty": "warn",
"no-ex-assign": "error",
"no-extra-semi": "error",
"no-fallthrough": "error",
"no-func-assign": "error",
"no-redeclare": "error",
"no-undef": "error",
"no-unreachable": "error",
"no-unused-vars": "warn",
"use-isnan": "error",
"valid-typeof": "error",
// Project-specific rules
"linebreak-style": ["error", "unix"],
"semi": ["error", "always"],
"semi-style": ["error", "last"],
"semi-spacing": ["error", {"before": false, "after": true}],
"quotes": ["warn", "double"],
"brace-style": "warn",
"indent": ["error", 4],
},
},
];