-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
37 lines (35 loc) · 1.02 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
import globals from "globals";
import pluginJs from "@eslint/js";
export default [
pluginJs.configs.recommended,
{
languageOptions: { globals: globals.browser },
rules: {
"no-duplicate-imports": ["error", { includeExports: true }],
"no-inner-declarations": ["error", "both"],
"no-self-compare": "error",
"no-template-curly-in-string": "warn",
"no-useless-assignment": "error",
"arrow-body-style": ["error", "as-needed"],
camelcase: "error",
"capitalized-comments": "warn",
eqeqeq: ["error", "always"],
"func-style": ["warn", "expression"],
"func-name-matching": "error",
"no-magic-numbers": [
"warn",
{
ignoreArrayIndexes: true,
ignoreDefaultValues: true,
enforceConst: true,
},
],
"no-nested-ternary": "error",
"no-useless-return": "warn",
"no-var": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
"no-else-return": "error",
},
},
];