-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
95 lines (94 loc) · 3.28 KB
/
eslint.config.mjs
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import eslintPluginUnicorn from "eslint-plugin-unicorn";
import js from "@eslint/js";
import globals from "globals";
export default [
js.configs.recommended,
eslintPluginUnicorn.configs["flat/recommended"],
{
languageOptions: {
sourceType: "script",
globals: { ...globals.browser },
},
rules: {
"camelcase": "error",
"consistent-this": "error",
"dot-notation": "error",
"eqeqeq": "error",
"func-style": "error",
"guard-for-in": "error",
"init-declarations": "error",
"max-nested-callbacks": "error",
"max-params": "error",
"new-cap": "error",
"no-alert": "error",
"no-array-constructor": "error",
"no-bitwise": "error",
"no-caller": "error",
"no-div-regex": "error",
"no-else-return": "error",
"no-eq-null": "error",
"no-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-implicit-coercion": "error",
"no-implied-eval": "error",
"no-inline-comments": "error",
"no-iterator": "error",
"no-label-var": "error",
"no-labels": "error",
"no-lone-blocks": "error",
"no-lonely-if": "error",
"no-loop-func": "error",
"no-multi-str": "error",
"no-negated-condition": "error",
"no-nested-ternary": "error",
"no-new": "error",
"no-new-func": "error",
"no-new-object": "error",
"no-new-wrappers": "error",
"no-octal-escape": "error",
"no-param-reassign": "error",
"no-proto": "error",
"no-restricted-syntax": [
"error",
"FunctionDeclaration",
"WithStatement",
"BinaryExpression[operator='in']",
],
"no-return-assign": "error",
"no-script-url": "error",
"no-self-compare": "error",
"no-shadow": "error",
"no-throw-literal": "error",
"no-underscore-dangle": "error",
"no-unneeded-ternary": "error",
"no-unused-expressions": "error",
"no-use-before-define": "error",
"no-useless-assignment": "error",
"no-useless-call": "error",
"no-useless-concat": "error",
"no-var": "error",
"no-void": "error",
"object-shorthand": "error",
"one-var": ["error", "never"],
"operator-assignment": "error",
"prefer-arrow-callback": ["error", { allowUnboundThis: false }],
"prefer-const": "error",
"prefer-spread": "error",
"radix": "error",
"sort-vars": "error",
"spaced-comment": "error",
"unicorn/numeric-separators-style": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-top-level-await": "off",
"yoda": "error",
},
},
{
files: ["tests/**/*.js", "scripts/**/*.js"],
languageOptions: {
sourceType: "commonjs",
globals: { ...globals.node },
},
},
];