-
Notifications
You must be signed in to change notification settings - Fork 217
/
eslint.config.js
44 lines (43 loc) · 1.22 KB
/
eslint.config.js
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
const js = require("@eslint/js");
const globals = require("globals");
module.exports = [
js.configs.recommended,
{
languageOptions: {
globals: {
...globals.es6,
...globals.node,
...globals.jasmine,
...globals.BigInt,
},
parserOptions: {
ecmaFeatures: { globalReturn: true },
},
sourceType: "commonjs",
ecmaVersion: 2022,
},
rules: {
"no-var": "error",
"prefer-const": "error",
"prefer-arrow-callback": "error",
"no-else-return": "error",
"no-multi-spaces": "error",
"no-whitespace-before-property": "error",
camelcase: "error",
"new-cap": "error",
"no-console": "error",
"comma-dangle": "error",
"no-shadow": "error",
"object-shorthand": ["error", "properties"],
indent: [
"error",
4,
{
SwitchCase: 1,
},
],
quotes: ["error", "single"],
semi: ["error", "always"],
},
},
];