Skip to content

Commit 2787b5e

Browse files
committed
Update ESLint configuration
1 parent d1711ba commit 2787b5e

File tree

1 file changed

+83
-9
lines changed

1 file changed

+83
-9
lines changed

Diff for: eslint/.eslintrc-magento

+83-9
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,32 @@
33
"amd": true,
44
"browser": true,
55
"es6": true,
6-
"es2017": true,
7-
"es2020": true,
8-
"es2021": true,
96
"jasmine": true,
107
"jquery": true,
118
"prototypejs": true,
129
"node": true
1310
},
1411
"rules": {
15-
"comma-dangle": [2, "never"],
12+
"array-bracket-spacing": [2, "never"],
13+
"arrow-spacing": [2, {"after": true, "before": true}],
14+
"block-spacing": [2, "always"],
15+
"brace-style": [2, "1tbs", {"allowSingleLine": true}],
16+
"comma-dangle": [ 2, "always-multiline" ],
17+
"comma-spacing": [2, {"after": true, "before": false}],
1618
"comma-style": [2, "last"],
19+
"constructor-super": 2,
1720
"curly": [2, "all"],
21+
"dot-location": [2, "property"],
22+
"dot-notation": [2, {"allowKeywords": true}],
1823
"eol-last": 2,
1924
"eqeqeq": [2, "smart"],
25+
"func-call-spacing": [2, "never"],
26+
"generator-star-spacing": [2, {"after": true, "before": true}],
2027
"guard-for-in": 2,
2128
"indent": [2, 4],
29+
"key-spacing": [2, {"afterColon": true, "beforeColon": false}],
2230
"keyword-spacing": [2, {"after": true, "before": true}],
31+
"linebreak-style": [2, "unix"],
2332
"lines-around-comment": [
2433
2,
2534
{
@@ -28,18 +37,35 @@
2837
"allowObjectStart": true
2938
}
3039
],
40+
"lines-between-class-members": [2, "always", {"exceptAfterSingleLine": true}],
3141
"max-depth": [2, 2],
3242
"max-len": [2, 120, 4],
3343
"max-nested-callbacks": [2, 3],
44+
"multiline-ternary": [2, "always-multiline"],
45+
"new-cap": [2, {"capIsNew": false, "newIsCap": true, "properties": true}],
46+
"new-parens": 2,
3447
"newline-after-var": 2,
3548
"no-alert": 2,
3649
"no-array-constructor": 2,
3750
"no-caller": 2,
51+
"no-case-declarations": 2,
3852
"no-catch-shadow": 2,
53+
"no-class-assign": 2,
54+
"no-compare-neg-zero": 2,
3955
"no-cond-assign": 2,
56+
"no-console": 2,
57+
"no-const-assign": 2,
4058
"no-constant-condition": 2,
59+
"no-control-regex": 2,
4160
"no-debugger": 2,
61+
"no-delete-var": 2,
62+
"no-dupe-args": 2,
63+
"no-dupe-class-members": 2,
64+
"no-dupe-keys": 2,
65+
"no-duplicate-case": 2,
4266
"no-else-return": 2,
67+
"no-empty-character-class": 2,
68+
"no-empty-pattern": 2,
4369
"no-empty": [2, {"allowEmptyCatch": true}],
4470
"no-eval": 2,
4571
"no-ex-assign": 2,
@@ -55,25 +81,53 @@
5581
"no-implied-eval": 2,
5682
"no-inner-declarations": 2,
5783
"no-invalid-regexp": 2,
84+
"no-irregular-whitespace": 2,
85+
"no-iterator": 2,
86+
"no-labels": [2, {"allowLoop": false, "allowSwitch": false}],
5887
"no-lone-blocks": 2,
5988
"no-lonely-if": 2,
6089
"no-loop-func": 2,
90+
"no-mixed-operators": [2, {"allowSamePrecedence": true, "groups": [["==", "!=", "===", "!==", ">", ">=", "<", "<="], ["&&", "||"], ["in", "instanceof"]]}],
6191
"no-mixed-spaces-and-tabs": 2,
92+
"no-multi-spaces": 2,
6293
"no-multi-str": 2,
63-
"no-multiple-empty-lines": 2,
94+
"no-multiple-empty-lines": [2, {"max": 1, "maxEOF": 0}],
6495
"no-native-reassign": 2,
6596
"no-negated-in-lhs": 2,
97+
"no-new-func": 2,
6698
"no-new-object": 2,
99+
"no-new-symbol": 2,
100+
"no-new-wrappers": 2,
101+
"no-new": 2,
102+
"no-obj-calls": 2,
103+
"no-octal-escape": 2,
104+
"no-octal": 2,
67105
"no-proto": 2,
106+
"no-prototype-builtins": 2,
68107
"no-redeclare": 2,
69108
"no-regex-spaces": 2,
70109
"no-return-assign": 2,
110+
"no-self-assign": [2, {"props": true}],
71111
"no-self-compare": 2,
112+
"no-sequences": 2,
72113
"no-shadow": 2,
114+
"no-shadow-restricted-names": 2,
115+
"no-sparse-arrays": 2,
116+
"no-tabs": 2,
117+
"no-template-curly-in-string": 2,
118+
"no-this-before-super": 2,
119+
"no-throw-literal": 2,
73120
"no-trailing-spaces": 2,
74121
"no-undef": 2,
75122
"no-undef-init": 2,
123+
"no-unexpected-multiline": 2,
124+
"no-unmodified-loop-condition": 2,
125+
"no-unneeded-ternary": [2, {"defaultAssignment": false}],
76126
"no-unreachable": 2,
127+
"no-unsafe-finally": 2,
128+
"no-unsafe-negation": 2,
129+
"no-unused-expressions": [2, {"allowShortCircuit": true, "allowTaggedTemplates": true, "allowTernary": true}],
130+
"no-unused-labels": 2,
77131
"no-unused-vars": [
78132
2,
79133
{
@@ -89,22 +143,42 @@
89143
"no-useless-escape": 2,
90144
"no-useless-rename": 2,
91145
"no-useless-return": 2,
146+
"no-var": 2,
147+
"no-void": 2,
148+
"no-whitespace-before-property": 2,
92149
"no-with": 2,
93-
"one-var": [2, "always"],
150+
"object-curly-newline": [2, {"consistent": true, "multiline": true}],
151+
"object-curly-spacing": [2, "always"],
152+
"object-property-newline": [2, {"allowMultiplePropertiesPerLine": true}],
153+
"one-var": [2, {"initialized": "never"}],
94154
"operator-assignment": [2, "always"],
95-
"quotes": [2, "single", {"allowTemplateLiterals": true}],
155+
"operator-linebreak": [2, "after", {"overrides": {":": "before", "?": "before", "|>": "before"}}],
156+
"padded-blocks": [2, {"blocks": "never", "classes": "never", "switches": "never"}],
157+
"prefer-const": [2, {"destructuring": "all"}],
158+
"prefer-promise-reject-errors": 2,
159+
"quote-props": [2, "as-needed"],
160+
"quotes": [2, "single", {"allowTemplateLiterals": true, "avoidEscape": true}],
96161
"radix": 2,
162+
"require-yield": 2,
163+
"rest-spread-spacing": [2, "never"],
97164
"semi": [2, "always"],
98165
"semi-spacing": 2,
99166
"space-before-blocks": [2, "always"],
100-
"space-before-function-paren": [2, {"anonymous": "always", "named": "never", "asyncArrow": "always"}],
167+
"space-before-function-paren": [2, "always"],
101168
"space-in-parens": [2, "never"],
102169
"space-infix-ops": 2,
103-
"space-unary-ops": [2, {"words": false, "nonwords": false}],
170+
"space-unary-ops": [2, {"nonwords": false, "words": true}],
171+
"spaced-comment": [2, "always", {"block": {"balanced": true, "exceptions": ["*"], "markers": ["*package", "!", ",", ":", "::", "flow-include"]}, "line": {"markers": ["*package", "!", "/", ",", "="]}}],
104172
"strict": ["error", "function"],
173+
"symbol-description": 2,
174+
"template-curly-spacing": [2, "never"],
175+
"template-tag-spacing": [2, "never"],
176+
"unicode-bom": [2, "never"],
105177
"use-isnan": 2,
106178
"valid-typeof": 2,
107179
"vars-on-top": 2,
180+
"wrap-iife": [2, "any", {"functionPrototypeMethods": true}],
181+
"yield-star-spacing": [2, "both"],
108182
"yoda": [2, "never"]
109183
}
110184
}

0 commit comments

Comments
 (0)