-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy patheslint.config.js
More file actions
48 lines (44 loc) · 1.29 KB
/
eslint.config.js
File metadata and controls
48 lines (44 loc) · 1.29 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
const { defineConfig, globalIgnores } = require("eslint/config");
const globals = require("globals");
const js = require("@eslint/js");
module.exports = defineConfig([
js.configs.recommended, // Recommended config applied to all files
// js.configs.all, // Lots of rules that might show bugs and complexity
{
languageOptions: {
globals: {
...Object.fromEntries(
Object.entries(globals.browser).map(([key]) => [key, "off"]),
),
...globals.mocha,
...globals.node,
},
ecmaVersion: 12,
parserOptions: {},
},
rules: {
"global-require": "error",
"indent": ["error", 2],
"no-console": "error",
"no-param-reassign": ["error", { "props": true, "ignorePropertyModificationsFor": ["acc"] }],
"no-plusplus": "error",
"no-underscore-dangle": "error",
"no-unused-vars": "error",
"max-len": [
"error",
120,
2,
{
ignoreUrls: true,
ignoreComments: false,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
},
],
"no-trailing-spaces": "error",
"semi": ["error", "always"],
},
},
globalIgnores(["**/public", "lib/About.js", "lib/FieldDB.js", "FieldDB"]),
]);