-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
80 lines (79 loc) · 2.19 KB
/
Copy patheslint.config.mjs
File metadata and controls
80 lines (79 loc) · 2.19 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
74
75
76
77
78
79
80
// eslint.config.mjs
// ESLint flat configuration for JavaScript and JavaScript modules.
import globals from "globals";
import js from "@eslint/js";
export default [
{
ignores: [
"Gruntfile.js", // Grunt task runner
"js/retrotxt-init.js", // ES2015+ feature detection
"test/retrotxt.js", // QUnit tests
],
},
js.configs.recommended,
{
files: ["**/*.js", "test/**/*"],
languageOptions: {
ecmaVersion: "latest",
parserOptions: {
ecmaFeatures: {
impliedStrict: true,
},
},
globals: {
...globals.browser,
},
},
linterOptions: {
//noInlineConfig: false,
reportUnusedDisableDirectives: "error",
},
rules: {
"no-useless-assignment": "error",
"require-atomic-updates": "error",
"accessor-pairs": "warn",
"symbol-description": "warn",
"no-eval": "error",
"no-empty-function": "warn",
"no-empty": "warn",
"no-else-return": "warn",
"no-bitwise": "warn",
"no-var": "warn",
"no-undefined": "warn",
"no-undef-init": "warn",
"no-useless-constructor": "warn",
"no-useless-concat": "warn",
"no-useless-computed-key": "warn",
"no-unneeded-ternary": "warn",
"prefer-template": "warn",
"prefer-spread": "warn",
"prefer-rest-params": "warn",
"prefer-const": "warn",
"prefer-arrow-callback": "warn",
"operator-assignment": "warn",
"no-throw-literal": "warn",
"no-script-url": "warn",
"no-return-assign": "warn",
"no-proto": "warn",
"no-param-reassign": "warn",
"no-octal-escape": "warn",
"no-object-constructor": "warn",
"no-new-wrappers": "warn",
"no-new-func": "warn",
"no-new": "warn",
"no-nested-ternary": "warn",
"no-negated-condition": "warn",
"no-multi-assign": "warn",
"no-magic-numbers": "warn",
"no-loop-func": "warn",
"no-lonely-if": "warn",
"no-implied-eval": "warn",
"no-implicit-globals": "warn",
"no-implicit-coercion": "warn",
"default-case-last": "warn",
"dot-notation": "warn",
eqeqeq: "warn",
"no-extend-native": "error",
},
},
];