-
-
Notifications
You must be signed in to change notification settings - Fork 40
/
eslint.config.mjs
80 lines (77 loc) · 2.29 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
import js from "@eslint/js";
import unicorn from "eslint-plugin-unicorn";
/* eslint-disable array-element-newline */
export default [
js.configs.all,
unicorn.configs["flat/all"],
{
"languageOptions": {
"ecmaVersion": 2021,
"globals": {
"console": "readonly",
"document": "readonly",
"DOMParser": "readonly",
"fetch": "readonly",
"Intl": "readonly",
"location": "readonly",
"require": "readonly",
"URL": "readonly",
"URLSearchParams": "readonly"
},
"sourceType": "commonjs"
},
"linterOptions": {
"reportUnusedDisableDirectives": true
},
"rules": {
"array-element-newline": [ "error", { "ArrayExpression": "always", "ArrayPattern": "never" } ],
"indent": [ "error", 2 ],
"init-declarations": "off",
"max-lines": "off",
"max-lines-per-function": "off",
"max-params": "off",
"max-statements": "off",
"multiline-comment-style": [ "error", "separate-lines" ],
"multiline-ternary": [ "error", "always-multiline" ],
"new-cap": [ "error", { "capIsNew": false } ],
"no-confusing-arrow": [ "error", { "allowParens": true } ],
"no-extra-parens": [ "error", "functions" ],
"no-magic-numbers": "off",
"no-plusplus": "off",
"no-ternary": "off",
"object-curly-newline": [ "error", { "ObjectExpression": { "consistent": true }, "ObjectPattern": { "consistent": true }, "ImportDeclaration": "never", "ExportDeclaration": "never" } ],
"one-var": [ "error", "never" ],
"padded-blocks": [ "error", "never" ],
"prefer-named-capture-group": "off",
"sort-keys": "off",
"unicorn/no-array-callback-reference": "off",
"unicorn/no-null": "off",
"unicorn/no-unreadable-array-destructuring": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-query-selector": "off",
"unicorn/prefer-string-raw": "off",
"unicorn/prefer-top-level-await": "off",
"unicorn/prevent-abbreviations": "off"
}
},
{
"files": [
"**/*.jsx"
],
"languageOptions": {
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
}
}
},
{
"files": [
"**/*.mjs"
],
"languageOptions": {
"sourceType": "module"
}
}
];