|
14 | 14 | "rules": { |
15 | 15 | "indent": ["error", 2], |
16 | 16 | "linebreak-style": ["error", "unix"], |
17 | | - "quotes": ["error", "single"], |
| 17 | + "quotes": ["error", "single", { "allowTemplateLiterals": true }], |
18 | 18 | "semi": ["error", "always"], |
19 | 19 | "no-loop-func": ["error"], |
20 | 20 | "block-spacing": ["error", "always"], |
21 | 21 | "camelcase": ["error"], |
22 | 22 | "eqeqeq": ["error", "always"], |
23 | 23 | "strict": ["error", "global"], |
24 | | - "brace-style": [ |
25 | | - "error", |
26 | | - "1tbs", |
27 | | - { |
28 | | - "allowSingleLine": true |
29 | | - } |
30 | | - ], |
| 24 | + "brace-style": ["error", "1tbs", { "allowSingleLine": true }], |
31 | 25 | "comma-style": ["error", "last"], |
32 | | - "comma-spacing": [ |
33 | | - "error", |
34 | | - { |
35 | | - "before": false, |
36 | | - "after": true |
37 | | - } |
38 | | - ], |
| 26 | + "comma-spacing": ["error", { "before": false, "after": true }], |
39 | 27 | "eol-last": ["error"], |
40 | 28 | "func-call-spacing": ["error", "never"], |
41 | 29 | "key-spacing": [ |
42 | 30 | "error", |
43 | | - { |
44 | | - "beforeColon": false, |
45 | | - "afterColon": true, |
46 | | - "mode": "minimum" |
47 | | - } |
| 31 | + { "beforeColon": false, "afterColon": true, "mode": "minimum" } |
48 | 32 | ], |
49 | 33 | "keyword-spacing": [ |
50 | 34 | "error", |
51 | 35 | { |
52 | 36 | "before": true, |
53 | 37 | "after": true, |
54 | | - "overrides": { |
55 | | - "function": { |
56 | | - "after": false |
57 | | - } |
58 | | - } |
59 | | - } |
60 | | - ], |
61 | | - "max-len": [ |
62 | | - "error", |
63 | | - { |
64 | | - "code": 80, |
65 | | - "ignoreUrls": true |
66 | | - } |
67 | | - ], |
68 | | - "max-nested-callbacks": [ |
69 | | - "error", |
70 | | - { |
71 | | - "max": 7 |
| 38 | + "overrides": { "function": { "after": false } } |
72 | 39 | } |
73 | 40 | ], |
| 41 | + "max-len": ["error", { "code": 80, "ignoreUrls": true }], |
| 42 | + "max-nested-callbacks": ["error", { "max": 7 }], |
74 | 43 | "new-cap": [ |
75 | 44 | "error", |
76 | | - { |
77 | | - "newIsCap": true, |
78 | | - "capIsNew": false, |
79 | | - "properties": true |
80 | | - } |
| 45 | + { "newIsCap": true, "capIsNew": true, "properties": true } |
81 | 46 | ], |
82 | 47 | "new-parens": ["error"], |
83 | 48 | "no-lonely-if": ["error"], |
|
86 | 51 | "no-whitespace-before-property": ["error"], |
87 | 52 | "object-curly-spacing": ["error", "always"], |
88 | 53 | "operator-assignment": ["error", "always"], |
89 | | - "operator-linebreak": ["error", "after"], |
90 | | - "semi-spacing": [ |
| 54 | + "operator-linebreak": [ |
91 | 55 | "error", |
92 | | - { |
93 | | - "before": false, |
94 | | - "after": true |
95 | | - } |
| 56 | + "after", |
| 57 | + { "overrides": { "?": "before", ":": "before" } } |
96 | 58 | ], |
| 59 | + "semi-spacing": ["error", { "before": false, "after": true }], |
97 | 60 | "space-before-blocks": ["error", "always"], |
98 | 61 | "space-before-function-paren": [ |
99 | 62 | "error", |
100 | | - { |
101 | | - "anonymous": "never", |
102 | | - "named": "never", |
103 | | - "asyncArrow": "always" |
104 | | - } |
| 63 | + { "anonymous": "never", "named": "never", "asyncArrow": "always" } |
105 | 64 | ], |
106 | 65 | "space-in-parens": ["error", "never"], |
107 | 66 | "space-infix-ops": ["error"], |
108 | 67 | "space-unary-ops": [ |
109 | 68 | "error", |
110 | | - { |
111 | | - "words": true, |
112 | | - "nonwords": false, |
113 | | - "overrides": { |
114 | | - "typeof": false |
115 | | - } |
116 | | - } |
| 69 | + { "words": true, "nonwords": false, "overrides": { "typeof": false } } |
117 | 70 | ], |
118 | 71 | "no-unreachable": ["error"], |
119 | 72 | "no-global-assign": ["error"], |
120 | 73 | "no-self-compare": ["error"], |
121 | 74 | "no-unmodified-loop-condition": ["error"], |
122 | | - "no-constant-condition": [ |
123 | | - "error", |
124 | | - { |
125 | | - "checkLoops": false |
126 | | - } |
127 | | - ], |
| 75 | + "no-constant-condition": ["error", { "checkLoops": false }], |
128 | 76 | "no-console": ["off"], |
129 | 77 | "no-useless-concat": ["error"], |
130 | 78 | "no-useless-escape": ["error"], |
131 | 79 | "no-shadow-restricted-names": ["error"], |
132 | | - "no-use-before-define": [ |
133 | | - "error", |
134 | | - { |
135 | | - "functions": false |
136 | | - } |
137 | | - ], |
| 80 | + "no-use-before-define": ["error", { "functions": false }], |
138 | 81 | "arrow-parens": ["error", "always"], |
139 | 82 | "arrow-body-style": ["error", "as-needed"], |
140 | 83 | "arrow-spacing": ["error"], |
141 | | - "no-confusing-arrow": [ |
142 | | - "error", |
143 | | - { |
144 | | - "allowParens": true |
145 | | - } |
146 | | - ], |
| 84 | + "no-confusing-arrow": 0, |
147 | 85 | "no-useless-computed-key": ["error"], |
148 | 86 | "no-useless-rename": ["error"], |
149 | 87 | "no-var": ["error"], |
|
155 | 93 | "prefer-spread": ["error"], |
156 | 94 | "rest-spread-spacing": ["error", "never"], |
157 | 95 | "template-curly-spacing": ["error", "never"], |
158 | | - "consistent-return": ["error", { "treatUndefinedAsUnspecified": true }] |
| 96 | + "consistent-return": ["error", { "treatUndefinedAsUnspecified": true }], |
| 97 | + "constructor-super": ["error"], |
| 98 | + "for-direction": ["error"], |
| 99 | + "getter-return": ["error"], |
| 100 | + "no-async-promise-executor": ["error"], |
| 101 | + "no-case-declarations": ["error"], |
| 102 | + "no-class-assign": ["error"], |
| 103 | + "no-compare-neg-zero": ["error"], |
| 104 | + "no-cond-assign": ["error"], |
| 105 | + "no-const-assign": ["error"], |
| 106 | + "no-constant-binary-expression": ["error"], |
| 107 | + "no-control-regex": ["error"], |
| 108 | + "no-debugger": ["error"], |
| 109 | + "no-delete-var": ["error"], |
| 110 | + "no-dupe-args": ["error"], |
| 111 | + "no-dupe-class-members": ["error"], |
| 112 | + "no-dupe-else-if": ["error"], |
| 113 | + "no-dupe-keys": ["error"], |
| 114 | + "no-duplicate-case": ["error"], |
| 115 | + "no-empty": ["error"], |
| 116 | + "no-empty-character-class": ["error"], |
| 117 | + "no-empty-pattern": ["error"], |
| 118 | + "no-empty-static-block": ["error"], |
| 119 | + "no-ex-assign": ["error"], |
| 120 | + "no-extra-boolean-cast": ["error"], |
| 121 | + "no-fallthrough": ["error"], |
| 122 | + "no-func-assign": ["error"], |
| 123 | + "no-import-assign": ["error"], |
| 124 | + "no-invalid-regexp": ["error"], |
| 125 | + "no-irregular-whitespace": ["error"], |
| 126 | + "no-loss-of-precision": ["error"], |
| 127 | + "no-misleading-character-class": ["error"], |
| 128 | + "no-new-native-nonconstructor": ["error"], |
| 129 | + "no-nonoctal-decimal-escape": ["error"], |
| 130 | + "no-obj-calls": ["error"], |
| 131 | + "no-octal": ["error"], |
| 132 | + "no-prototype-builtins": ["error"], |
| 133 | + "no-redeclare": ["error"], |
| 134 | + "no-regex-spaces": ["error"], |
| 135 | + "no-self-assign": ["error"], |
| 136 | + "no-setter-return": ["error"], |
| 137 | + "no-sparse-arrays": ["error"], |
| 138 | + "no-this-before-super": ["error"], |
| 139 | + "no-undef": ["error"], |
| 140 | + "no-unexpected-multiline": 0, |
| 141 | + "no-unsafe-finally": ["error"], |
| 142 | + "no-unsafe-negation": ["error"], |
| 143 | + "no-unsafe-optional-chaining": ["error"], |
| 144 | + "no-unused-labels": ["error"], |
| 145 | + "no-unused-private-class-members": ["error"], |
| 146 | + "no-unused-vars": ["error"], |
| 147 | + "no-useless-backreference": ["error"], |
| 148 | + "no-useless-catch": ["error"], |
| 149 | + "no-with": ["error"], |
| 150 | + "require-yield": ["error"], |
| 151 | + "use-isnan": ["error"], |
| 152 | + "valid-typeof": ["error"], |
| 153 | + "curly": ["error", "multi-line", "consistent"], |
| 154 | + "space-unary-word-ops": "off", |
| 155 | + "generator-star": "off", |
| 156 | + "no-comma-dangle": "off", |
| 157 | + "no-reserved-keys": "off", |
| 158 | + "no-space-before-semi": "off", |
| 159 | + "no-wrap-func": "off", |
| 160 | + "space-after-function-name": "off", |
| 161 | + "space-before-function-parentheses": "off", |
| 162 | + "space-in-brackets": "off", |
| 163 | + "no-arrow-condition": "off", |
| 164 | + "space-after-keywords": "off", |
| 165 | + "space-before-keywords": "off", |
| 166 | + "space-return-throw-case": "off", |
| 167 | + "no-spaced-func": "off", |
| 168 | + "indent-legacy": "off", |
| 169 | + "array-bracket-newline": "off", |
| 170 | + "array-bracket-spacing": "off", |
| 171 | + "array-element-newline": "off", |
| 172 | + "comma-dangle": ["error", "always-multiline"], |
| 173 | + "computed-property-spacing": "off", |
| 174 | + "dot-location": "off", |
| 175 | + "function-call-argument-newline": "off", |
| 176 | + "function-paren-newline": "off", |
| 177 | + "generator-star-spacing": "off", |
| 178 | + "implicit-arrow-linebreak": "off", |
| 179 | + "jsx-quotes": "off", |
| 180 | + "lines-around-comment": 0, |
| 181 | + "max-statements-per-line": "off", |
| 182 | + "multiline-ternary": "off", |
| 183 | + "newline-per-chained-call": "off", |
| 184 | + "no-extra-parens": [ |
| 185 | + "error", |
| 186 | + "all", |
| 187 | + { |
| 188 | + "returnAssign": false, |
| 189 | + "nestedBinaryExpressions": false, |
| 190 | + "enforceForArrowConditionals": false |
| 191 | + } |
| 192 | + ], |
| 193 | + "no-extra-semi": "off", |
| 194 | + "no-floating-decimal": "off", |
| 195 | + "no-mixed-operators": 0, |
| 196 | + "no-mixed-spaces-and-tabs": "off", |
| 197 | + "no-multi-spaces": "off", |
| 198 | + "no-multiple-empty-lines": "off", |
| 199 | + "no-tabs": 0, |
| 200 | + "nonblock-statement-body-position": "off", |
| 201 | + "object-curly-newline": "off", |
| 202 | + "object-property-newline": "off", |
| 203 | + "one-var-declaration-per-line": "off", |
| 204 | + "padded-blocks": "off", |
| 205 | + "quote-props": "off", |
| 206 | + "semi-style": "off", |
| 207 | + "switch-colon-spacing": "off", |
| 208 | + "template-tag-spacing": "off", |
| 209 | + "wrap-iife": "off", |
| 210 | + "wrap-regex": "off", |
| 211 | + "yield-star-spacing": "off", |
| 212 | + "react/jsx-space-before-closing": "off", |
| 213 | + "no-return-assign": ["error"], |
| 214 | + "handle-callback-err": ["error", "^err"], |
| 215 | + "no-nested-ternary": ["error"], |
| 216 | + "no-invalid-this": ["error"], |
| 217 | + "class-methods-use-this": ["warn"] |
159 | 218 | } |
160 | 219 | } |
0 commit comments