-
Notifications
You must be signed in to change notification settings - Fork 6
/
.eslintrc.js
160 lines (157 loc) · 4.88 KB
/
.eslintrc.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
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
module.exports = {
"root": true,
"env": {
"browser": true,
"es2024": true,
},
"plugins": [
"import",
],
"extends": [
"eslint:recommended",
"plugin:import/recommended",
],
"parserOptions": {
"ecmaVersion": 15,
"sourceType": "module",
},
"globals": {
"CONSTANTS": "readonly",
},
"settings": {
"import/resolver": {
"alias": [
["~", "./src"],
],
},
},
"rules": {
"array-callback-return": "warn",
"no-constant-binary-expression": "warn",
"no-constant-condition": ["warn", {"checkLoops": false}],
"no-constructor-return": "warn",
"no-duplicate-imports": "warn",
"no-empty-pattern": "off",
"no-promise-executor-return": "warn",
"no-self-compare": "warn",
"no-undef": ["error", {"typeof": true}],
"no-unmodified-loop-condition": "warn",
"no-unreachable-loop": "warn",
"no-unused-private-class-members": "warn",
"no-unused-vars": ["warn", {"argsIgnorePattern": "^_$"}],
"require-atomic-updates": ["warn", {"allowProperties": true}],
"accessor-pairs": "warn",
"consistent-return": "warn",
"default-case-last": "warn",
"default-param-last": "warn",
"dot-notation": "warn",
"func-name-matching": ["warn", {"considerPropertyDescriptor": true}],
"func-names": ["warn", "as-needed"],
"grouped-accessor-pairs": ["warn", "getBeforeSet"],
"max-depth": "warn",
"max-nested-callbacks": "warn",
"new-cap": ["warn", {"newIsCap": false}],
"no-array-constructor": "warn",
"no-caller": "warn",
"no-confusing-arrow": "warn",
"no-div-regex": "warn",
"no-eval": "warn",
"no-extend-native": "warn",
"no-extra-bind": "warn",
"no-extra-boolean-cast": ["warn", {"enforceForLogicalOperands": true}],
"no-extra-label": "warn",
"no-floating-decimal": "warn",
"no-implicit-coercion": "warn",
"no-implicit-globals": ["warn", {"lexicalBindings": true}],
"no-implied-eval": "warn",
"no-invalid-this": "warn",
"no-iterator": "warn",
"no-label-var": "warn",
"no-labels": "warn",
"no-lone-blocks": "warn",
"no-loop-func": "warn",
"no-multi-assign": "warn",
"no-multi-str": "warn",
"no-new": "warn",
"no-new-func": "warn",
"no-new-object": "warn",
"no-new-wrappers": "warn",
"no-octal-escape": "warn",
"no-proto": "warn",
"no-return-assign": ["warn", "always"],
"no-script-url": "warn",
"no-sequences": ["warn", {"allowInParentheses": false}],
"no-throw-literal": "warn",
"no-undef-init": "warn",
"no-unneeded-ternary": "warn",
"no-unused-expressions": "warn",
"no-useless-call": "warn",
"no-useless-computed-key": ["warn", {"enforceForClassMembers": true}],
"no-useless-concat": "warn",
"no-useless-constructor": "warn",
"no-useless-rename": "warn",
"no-useless-return": "warn",
"no-var": "warn",
"no-void": "warn",
"operator-assignment": "warn",
"prefer-arrow-callback": "warn",
"prefer-const": ["warn", {"destructuring": "all"}],
"prefer-exponentiation-operator": "warn",
"prefer-numeric-literals": "warn",
"prefer-object-has-own": "warn",
"prefer-object-spread": "warn",
"prefer-promise-reject-errors": "warn",
"prefer-regex-literals": ["warn", {"disallowRedundantWrapping": true}],
"prefer-rest-params": "warn",
"prefer-spread": "warn",
"require-await": "warn",
"strict": "warn",
"symbol-description": "warn",
"vars-on-top": "warn",
"arrow-spacing": "warn",
"block-spacing": "warn",
"brace-style": ["warn", "1tbs", {"allowSingleLine": true}],
"comma-dangle": ["warn", "always-multiline"],
"comma-spacing": "warn",
"comma-style": "warn",
"computed-property-spacing": "warn",
"dot-location": ["warn", "property"],
"eol-last": ["warn", "never"],
"func-call-spacing": "warn",
"generator-star-spacing": "warn",
"implicit-arrow-linebreak": "warn",
"jsx-quotes": "warn",
"keyword-spacing": "warn",
"linebreak-style": ["warn", "unix"],
"lines-between-class-members": ["warn", "always", {"exceptAfterSingleLine": true}],
"new-parens": "warn",
"no-extra-parens": ["warn", "functions"],
"no-multi-spaces": ["warn", {"exceptions": {"ObjectExpression": true}}],
"no-multiple-empty-lines": "warn",
"no-trailing-spaces": "warn",
"no-whitespace-before-property": "warn",
"operator-linebreak": ["warn", "before"],
"padded-blocks": ["warn", "never"],
"quotes": ["warn", "double", {"allowTemplateLiterals": true}],
"rest-spread-spacing": "warn",
"semi": "warn",
"semi-spacing": "warn",
"semi-style": "warn",
"space-before-blocks": "warn",
"space-before-function-paren": ["warn", {"anonymous": "never", "named": "never", "asyncArrow": "always"}],
"space-unary-ops": "warn",
"switch-colon-spacing": "warn",
"template-curly-spacing": "warn",
"template-tag-spacing": "warn",
"unicode-bom": "warn",
"wrap-iife": "warn",
"yield-star-spacing": "warn",
"import/order": ["warn", {
"groups": [
"builtin", "external", "internal", "parent", "sibling", "index",
],
"newlines-between": "always",
"alphabetize": {"order": "asc", "caseInsensitive": true},
}],
},
};