-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy patheslint.config.mjs
More file actions
91 lines (90 loc) · 3.12 KB
/
Copy patheslint.config.mjs
File metadata and controls
91 lines (90 loc) · 3.12 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
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
import {defineConfig} from "eslint/config";
import globals from "globals";
import {flatConfigs as importX} from "eslint-plugin-import-x";
import js from "@eslint/js";
import json from "@eslint/json";
import stylistic from "@stylistic/eslint-plugin";
export default defineConfig([
{
"files": ["**/*.js"],
"languageOptions": {
"ecmaVersion": "latest",
"globals": {
...globals.browser,
...globals.node
}
},
"extends": [importX.recommended, js.configs.all, stylistic.configs.all],
"rules": {
"@stylistic/array-element-newline": ["error", "consistent"],
"@stylistic/dot-location": ["error", "property"],
"@stylistic/function-call-argument-newline": ["error", "consistent"],
"@stylistic/function-paren-newline": ["error", "consistent"],
"@stylistic/implicit-arrow-linebreak": "off",
"@stylistic/indent": ["error", 2],
"@stylistic/multiline-comment-style": "off",
"@stylistic/multiline-ternary": "off",
"@stylistic/newline-per-chained-call": "off",
"@stylistic/no-extra-parens": ["error", "functions"],
"@stylistic/nonblock-statement-body-position": "off",
"@stylistic/padded-blocks": ["error", "never"],
"@stylistic/quote-props": ["error", "consistent"],
"camelcase": ["error", {"allow": ["CMD_changeScene", "ms_busystatus"]}],
"capitalized-comments": "off",
"complexity": ["warn", 25],
"curly": "off",
"default-case": "off",
"id-length": ["warn", {"exceptions": ["a", "b", "c", "e", "f", "i", "j", "k", "l", "p", "r", "t", "v"]}],
"init-declarations": "off",
"max-lines": ["warn", 550],
"max-lines-per-function": ["warn", 150],
"max-params": ["warn", 5],
"max-statements": ["warn", 70],
"no-inline-comments": "off",
"no-magic-numbers": "off",
"no-param-reassign": [
"error",
{
"ignorePropertyModificationsFor": [
"arrs",
"calendar",
"dom",
"e",
"payload",
"slotDom",
"targetDom"
],
"props": true
}
],
"no-plusplus": ["error", {"allowForLoopAfterthoughts": true}],
"no-ternary": "off",
"no-warning-comments": "warn",
"one-var": "off",
"prefer-destructuring": "off",
"sort-keys": "off",
"strict": "off"
}
},
{
"files": ["**/*.mjs"],
"languageOptions": {
"ecmaVersion": "latest",
"globals": {
...globals.node
},
"sourceType": "module"
},
"extends": [importX.recommended, js.configs.all, stylistic.configs.all],
"rules": {
"@stylistic/array-element-newline": ["error", "consistent"],
"@stylistic/indent": ["error", 2],
"@stylistic/object-property-newline": ["error", {"allowAllPropertiesOnSameLine": true}],
"import-x/no-unresolved": ["error", {"ignore": ["eslint/config"]}],
"no-magic-numbers": "off",
"one-var": "off",
"sort-keys": "off"
}
},
{"files": ["**/*.json"], "ignores": ["package-lock.json"], "plugins": {json}, "extends": ["json/recommended"], "language": "json/json"}
]);