@spscommerce/eslint-config-typescript 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,125 +1,196 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.stylisticIssues = void 0;
4
+ // ✅ = recommended, 🔧 = fixable
4
5
  exports.stylisticIssues = {
5
- /** enforce line breaks after opening and before closing array brackets
6
- * https://eslint.org/docs/rules/array-bracket-newline */
7
- 'array-bracket-newline': ['error', 'consistent'],
8
- /** enforce line breaks between array elements
9
- * https://eslint.org/docs/rules/array-element-newline */
10
- 'array-element-newline': ['error', { multiline: true, minItems: 3 }],
11
- /** enforce spacing inside array brackets
12
- * https://eslint.org/docs/rules/array-bracket-spacing */
13
- 'array-bracket-spacing': ['error', 'never'],
14
- /** enforce spacing inside single-line blocks
15
- * https://eslint.org/docs/rules/block-spacing */
16
- 'block-spacing': ['error', 'always'],
17
- /** enforce one true brace style
18
- * https://eslint.org/docs/rules/brace-style
19
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/brace-style.md */
20
- 'brace-style': 'off',
21
- '@typescript-eslint/brace-style': 'error',
22
- /** require camel case names
23
- * https://eslint.org/docs/rules/camelcase */
24
- camelcase: ['error', { properties: 'never' }],
25
- /** enforce or disallow capitalization of the first letter of a comment
26
- * https://eslint.org/docs/rules/capitalized-comments */
27
- 'capitalized-comments': 'off',
28
- /** require trailing commas in multiline object literals
29
- * https://eslint.org/docs/rules/comma-dangle
30
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-dangle.md */
31
- 'comma-dangle': 'off',
32
- '@typescript-eslint/comma-dangle': ['error', 'always-multiline'],
33
- /** enforce spacing before/after comma
34
- * https://eslint.org/docs/rules/comma-spacing
35
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-spacing.md */
36
- 'comma-spacing': 'off',
37
- '@typescript-eslint/comma-spacing': 'error',
38
- /** enforce one true comma style
39
- * https://eslint.org/docs/rules/comma-style */
40
- 'comma-style': 'error',
41
- /** disallow padding inside computed properties
42
- * https://eslint.org/docs/rules/computed-property-spacing */
43
- 'computed-property-spacing': 'error',
44
- /** enforces consistent naming when capturing the current execution context
45
- * https://eslint.org/docs/rules/consistent-this
46
- * doing this at all is forbidden */
47
- 'consistent-this': 'off',
48
- /** enforce newline at the end of file, with no multiple empty lines
49
- * https://eslint.org/docs/rules/eol-last */
50
- 'eol-last': 'error',
51
- /** enforce spacing between functions and their invocations
52
- * https://eslint.org/docs/rules/func-call-spacing
53
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/func-call-spacing.md */
54
- 'func-call-spacing': 'off',
55
- '@typescript-eslint/func-call-spacing': 'error',
56
- /** requires function names to match the name of the variable or property to which they are assigned
57
- * https://eslint.org/docs/rules/func-name-matching */
58
- 'func-name-matching': 'off',
59
- /** require function expressions to have a name
60
- * https://eslint.org/docs/rules/func-names */
61
- 'func-names': 'off',
62
- /** enforces use of function declarations or expressions
63
- * https://eslint.org/docs/rules/func-style */
64
- 'func-style': ['off', 'expression'],
65
- /** enforce line breaks between arguments of a function call
66
- * https://eslint.org/docs/rules/function-call-argument-newline */
67
- 'function-call-argument-newline': ['off', 'consistent'],
68
- /** enforce consistent line breaks inside function parentheses
69
- * https://eslint.org/docs/rules/function-paren-newline */
70
- 'function-paren-newline': ['error', 'consistent'],
71
- /** Blacklist certain identifiers to prevent them being used
72
- * https://eslint.org/docs/rules/id-blacklist */
73
- 'id-blacklist': 'off',
74
- /** disallow specified identifiers
75
- * https://eslint.org/docs/rules/id-denylist */
76
- 'id-denylist': 'off',
77
- /** this option enforces minimum and maximum identifier lengths (variable names, property names etc.)
78
- * https://eslint.org/docs/rules/id-length */
79
- 'id-length': 'off',
80
- /** require identifiers to match the provided regular expression
81
- * https://eslint.org/docs/rules/id-match */
82
- 'id-match': 'off',
83
- /** Enforce the location of arrow function bodies with implicit returns
84
- * https://eslint.org/docs/rules/implicit-arrow-linebreak */
85
- 'implicit-arrow-linebreak': 'error',
86
- /** this option sets a specific tab width for your code
87
- * https://eslint.org/docs/rules/indent
88
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/indent.md */
89
- indent: 'off',
90
- '@typescript-eslint/indent': ['error', 2],
91
- /** specify whether double or single quotes should be used in JSX attributes
92
- * https://eslint.org/docs/rules/jsx-quotes */
93
- 'jsx-quotes': 'error',
94
- /** enforces spacing between keys and values in object literal properties
95
- * https://eslint.org/docs/rules/key-spacing */
96
- 'key-spacing': 'error',
97
- /** require a space before & after certain keywords
98
- * https://eslint.org/docs/rules/keyword-spacing
99
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/keyword-spacing.md */
100
- 'keyword-spacing': 'off',
101
- '@typescript-eslint/keyword-spacing': 'error',
102
- /** enforce position of line comments
103
- * https://eslint.org/docs/rules/line-comment-position */
104
- 'line-comment-position': 'error',
105
- /** disallow mixed 'LF' and 'CRLF' as linebreaks
106
- * https://eslint.org/docs/rules/linebreak-style */
107
- 'linebreak-style': 'error',
108
- /** enforces empty lines around comments
109
- * https://eslint.org/docs/rules/lines-around-comment */
110
- 'lines-around-comment': 'off',
111
- /** require or disallow an empty line between class members
112
- * https://eslint.org/docs/rules/lines-between-class-members
113
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/lines-between-class-members.md */
114
- 'lines-between-class-members': 'off',
115
- '@typescript-eslint/lines-between-class-members': 'error',
116
- /** specify the maximum depth that blocks can be nested
117
- * https://eslint.org/docs/rules/max-depth */
118
- 'max-depth': 'warn',
119
- /** specify the maximum length of a line in your program
120
- * https://eslint.org/docs/rules/max-len */
121
- 'max-len': [
122
- 'error',
6
+ /**
7
+ * enforce line breaks after opening and before closing array brackets 🔧
8
+ * https://eslint.org/docs/rules/array-bracket-newline
9
+ */
10
+ "array-bracket-newline": ["error", "consistent"],
11
+ /**
12
+ * enforce spacing inside array brackets 🔧
13
+ * https://eslint.org/docs/rules/array-bracket-spacing
14
+ */
15
+ "array-bracket-spacing": ["error", "never"],
16
+ /**
17
+ * enforce line breaks between array elements 🔧
18
+ * https://eslint.org/docs/rules/array-element-newline
19
+ */
20
+ "array-element-newline": ["error", { multiline: true, minItems: 3 }],
21
+ /**
22
+ * enforce spacing inside single-line blocks 🔧
23
+ * https://eslint.org/docs/rules/block-spacing
24
+ */
25
+ "block-spacing": ["error", "always"],
26
+ /**
27
+ * enforce one true brace style 🔧
28
+ * https://eslint.org/docs/rules/brace-style
29
+ * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/brace-style.md
30
+ */
31
+ "brace-style": "off",
32
+ "@typescript-eslint/brace-style": "error",
33
+ /**
34
+ * require camel case names
35
+ * https://eslint.org/docs/rules/camelcase
36
+ */
37
+ camelcase: ["error", { properties: "never" }],
38
+ /**
39
+ * enforce or disallow capitalization of the first letter of a comment 🔧
40
+ * https://eslint.org/docs/rules/capitalized-comments
41
+ */
42
+ "capitalized-comments": "off",
43
+ /**
44
+ * require trailing commas in multiline object literals 🔧
45
+ * https://eslint.org/docs/rules/comma-dangle
46
+ * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-dangle.md
47
+ */
48
+ "comma-dangle": "off",
49
+ "@typescript-eslint/comma-dangle": ["error", "always-multiline"],
50
+ /**
51
+ * enforce spacing before/after comma 🔧
52
+ * https://eslint.org/docs/rules/comma-spacing
53
+ * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-spacing.md
54
+ */
55
+ "comma-spacing": "off",
56
+ "@typescript-eslint/comma-spacing": "error",
57
+ /**
58
+ * enforce one true comma style 🔧
59
+ * https://eslint.org/docs/rules/comma-style
60
+ */
61
+ "comma-style": "error",
62
+ /**
63
+ * disallow padding inside computed properties 🔧
64
+ * https://eslint.org/docs/rules/computed-property-spacing
65
+ */
66
+ "computed-property-spacing": "error",
67
+ /**
68
+ * enforces consistent naming when capturing the current execution context
69
+ * https://eslint.org/docs/rules/consistent-this
70
+ * doing this at all is forbidden
71
+ */
72
+ "consistent-this": "off",
73
+ /**
74
+ * enforce newline at the end of file, with no multiple empty lines 🔧
75
+ * https://eslint.org/docs/rules/eol-last
76
+ */
77
+ "eol-last": "error",
78
+ /**
79
+ * enforce spacing between functions and their invocations 🔧
80
+ * https://eslint.org/docs/rules/func-call-spacing
81
+ * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/func-call-spacing.md
82
+ */
83
+ "func-call-spacing": "off",
84
+ "@typescript-eslint/func-call-spacing": "error",
85
+ /**
86
+ * requires function names to match the name of the
87
+ * variable or property to which they are assigned
88
+ * https://eslint.org/docs/rules/func-name-matching
89
+ */
90
+ "func-name-matching": "off",
91
+ /**
92
+ * require function expressions to have a name
93
+ * https://eslint.org/docs/rules/func-names
94
+ */
95
+ "func-names": "off",
96
+ /**
97
+ * enforces use of function declarations or expressions
98
+ * https://eslint.org/docs/rules/func-style
99
+ */
100
+ "func-style": ["off", "expression"],
101
+ /**
102
+ * enforce line breaks between arguments of a function call 🔧
103
+ * https://eslint.org/docs/rules/function-call-argument-newline
104
+ */
105
+ "function-call-argument-newline": ["off", "consistent"],
106
+ /**
107
+ * enforce consistent line breaks inside function parentheses 🔧
108
+ * https://eslint.org/docs/rules/function-paren-newline
109
+ */
110
+ "function-paren-newline": ["error", "consistent"],
111
+ /**
112
+ * Blacklist certain identifiers to prevent them being used
113
+ * https://eslint.org/docs/rules/id-blacklist
114
+ */
115
+ "id-blacklist": "off",
116
+ /**
117
+ * disallow specified identifiers
118
+ * https://eslint.org/docs/rules/id-denylist
119
+ */
120
+ "id-denylist": "off",
121
+ /**
122
+ * this option enforces minimum and maximum identifier
123
+ * lengths (variable names, property names etc.)
124
+ * https://eslint.org/docs/rules/id-length
125
+ */
126
+ "id-length": "off",
127
+ /**
128
+ * require identifiers to match the provided regular expression
129
+ * https://eslint.org/docs/rules/id-match
130
+ */
131
+ "id-match": "off",
132
+ /**
133
+ * Enforce the location of arrow function bodies with implicit returns 🔧
134
+ * https://eslint.org/docs/rules/implicit-arrow-linebreak
135
+ */
136
+ "implicit-arrow-linebreak": "error",
137
+ /**
138
+ * this option sets a specific tab width for your code 🔧
139
+ * https://eslint.org/docs/rules/indent
140
+ * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/indent.md
141
+ */
142
+ indent: "off",
143
+ "@typescript-eslint/indent": ["error", 2],
144
+ /**
145
+ * specify whether double or single quotes should be used in JSX attributes 🔧
146
+ * https://eslint.org/docs/rules/jsx-quotes
147
+ */
148
+ "jsx-quotes": "error",
149
+ /**
150
+ * enforces spacing between keys and values in object literal properties 🔧
151
+ * https://eslint.org/docs/rules/key-spacing
152
+ */
153
+ "key-spacing": "error",
154
+ /**
155
+ * require a space before & after certain keywords 🔧
156
+ * https://eslint.org/docs/rules/keyword-spacing
157
+ * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/keyword-spacing.md
158
+ */
159
+ "keyword-spacing": "off",
160
+ "@typescript-eslint/keyword-spacing": "error",
161
+ /**
162
+ * enforce position of line comments
163
+ * https://eslint.org/docs/rules/line-comment-position
164
+ */
165
+ "line-comment-position": "error",
166
+ /**
167
+ * disallow mixed 'LF' and 'CRLF' as linebreaks 🔧
168
+ * https://eslint.org/docs/rules/linebreak-style
169
+ */
170
+ "linebreak-style": "error",
171
+ /**
172
+ * enforces empty lines around comments 🔧
173
+ * https://eslint.org/docs/rules/lines-around-comment
174
+ */
175
+ "lines-around-comment": "off",
176
+ /**
177
+ * require or disallow an empty line between class members 🔧
178
+ * https://eslint.org/docs/rules/lines-between-class-members
179
+ * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/lines-between-class-members.md
180
+ */
181
+ "lines-between-class-members": "off",
182
+ "@typescript-eslint/lines-between-class-members": "error",
183
+ /**
184
+ * specify the maximum depth that blocks can be nested
185
+ * https://eslint.org/docs/rules/max-depth
186
+ */
187
+ "max-depth": "warn",
188
+ /**
189
+ * specify the maximum length of a line in your program
190
+ * https://eslint.org/docs/rules/max-len
191
+ */
192
+ "max-len": [
193
+ "error",
123
194
  {
124
195
  code: 100,
125
196
  tabWidth: 2,
@@ -130,233 +201,360 @@ exports.stylisticIssues = {
130
201
  ignoreTemplateLiterals: true,
131
202
  },
132
203
  ],
133
- /** specify the max number of lines in a file
134
- * https://eslint.org/docs/rules/max-lines */
135
- 'max-lines': 'off',
136
- /** enforce a maximum function length
137
- * https://eslint.org/docs/rules/max-lines-per-function */
138
- 'max-lines-per-function': 'off',
139
- /** specify the maximum depth callbacks can be nested
140
- * https://eslint.org/docs/rules/max-nested-callbacks */
141
- 'max-nested-callbacks': 'off',
142
- /** limits the number of parameters that can be used in the function declaration.
143
- * https://eslint.org/docs/rules/max-params */
144
- 'max-params': 'off',
145
- /** specify the maximum number of statement allowed in a function
146
- * https://eslint.org/docs/rules/max-statements */
147
- 'max-statements': 'off',
148
- /** restrict the number of statements per line
149
- * https://eslint.org/docs/rules/max-statements-per-line */
150
- 'max-statements-per-line': 'off',
151
- /** enforce a particular style for multiline comments
152
- * https://eslint.org/docs/rules/multiline-comment-style */
153
- 'multiline-comment-style': 'error',
154
- /** require multiline ternary
155
- * https://eslint.org/docs/rules/multiline-ternary */
156
- 'multiline-ternary': 'off',
157
- /** require a capital letter for constructors
158
- * https://eslint.org/docs/rules/new-cap */
159
- 'new-cap': 'error',
160
- /** disallow the omission of parentheses when invoking a constructor with no arguments
161
- * https://eslint.org/docs/rules/new-parens */
162
- 'new-parens': 'error',
163
- /** enforces new line after each method call in the chain to make it more readable and easy to maintain
164
- * https://eslint.org/docs/rules/newline-per-chained-call */
165
- 'newline-per-chained-call': 'error',
166
- /** disallow use of the Array constructor
167
- * https://eslint.org/docs/rules/no-array-constructor
168
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-array-constructor.md */
169
- 'no-array-constructor': 'off',
170
- '@typescript-eslint/no-array-constructor': 'error',
171
- /** disallow use of bitwise operators
172
- * https://eslint.org/docs/rules/no-bitwise */
173
- 'no-bitwise': 'warn',
174
- /** disallow use of the continue statement
175
- * https://eslint.org/docs/rules/no-continue */
176
- 'no-continue': 'error',
177
- /** disallow comments inline after code
178
- * https://eslint.org/docs/rules/no-inline-comments */
179
- 'no-inline-comments': 'error',
180
- /** disallow if as the only statement in an else block
181
- * https://eslint.org/docs/rules/no-lonely-if */
182
- 'no-lonely-if': 'error',
183
- /** disallow un-paren'd mixes of different operators
184
- * https://eslint.org/docs/rules/no-mixed-operators */
185
- 'no-mixed-operators': 'error',
186
- /** disallow mixed spaces and tabs for indentation
187
- * https://eslint.org/docs/rules/no-mixed-spaces-and-tabs */
188
- 'no-mixed-spaces-and-tabs': 'error',
189
- /** disallow use of chained assignment expressions
190
- * https://eslint.org/docs/rules/no-multi-assign */
191
- 'no-multi-assign': 'error',
192
- /** disallow multiple empty lines, only one newline at the end, and no new lines at the beginning
193
- * https://eslint.org/docs/rules/no-multiple-empty-lines */
194
- 'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0, maxEOF: 0 }],
195
- /** disallow negated conditions
196
- * https://eslint.org/docs/rules/no-negated-condition */
197
- 'no-negated-condition': 'off',
198
- /** disallow nested ternary expressions
199
- * https://eslint.org/docs/rules/no-nested-ternary */
200
- 'no-nested-ternary': 'error',
201
- /** disallow use of the Object constructor
202
- * https://eslint.org/docs/rules/no-new-object */
203
- 'no-new-object': 'error',
204
- /** disallow use of unary operators, ++ and --
205
- * https://eslint.org/docs/rules/no-plusplus */
206
- 'no-plusplus': 'error',
207
- /** disallow certain syntax forms
208
- * https://eslint.org/docs/rules/no-restricted-syntax */
209
- 'no-restricted-syntax': [
210
- 'error',
204
+ /**
205
+ * specify the max number of lines in a file
206
+ * https://eslint.org/docs/rules/max-lines
207
+ */
208
+ "max-lines": "off",
209
+ /**
210
+ * enforce a maximum function length
211
+ * https://eslint.org/docs/rules/max-lines-per-function
212
+ */
213
+ "max-lines-per-function": "off",
214
+ /**
215
+ * specify the maximum depth callbacks can be nested
216
+ * https://eslint.org/docs/rules/max-nested-callbacks
217
+ */
218
+ "max-nested-callbacks": "off",
219
+ /**
220
+ * limits the number of parameters that can be used in the function declaration.
221
+ * https://eslint.org/docs/rules/max-params
222
+ */
223
+ "max-params": "off",
224
+ /**
225
+ * specify the maximum number of statement allowed in a function
226
+ * https://eslint.org/docs/rules/max-statements
227
+ */
228
+ "max-statements": "off",
229
+ /**
230
+ * restrict the number of statements per line
231
+ * https://eslint.org/docs/rules/max-statements-per-line
232
+ */
233
+ "max-statements-per-line": "off",
234
+ /**
235
+ * enforce a particular style for multiline comments 🔧
236
+ * https://eslint.org/docs/rules/multiline-comment-style
237
+ */
238
+ "multiline-comment-style": "error",
239
+ /**
240
+ * require multiline ternary 🔧
241
+ * https://eslint.org/docs/rules/multiline-ternary
242
+ */
243
+ "multiline-ternary": "off",
244
+ /**
245
+ * require a capital letter for constructors
246
+ * https://eslint.org/docs/rules/new-cap
247
+ */
248
+ "new-cap": "error",
249
+ /**
250
+ * disallow the omission of parentheses when invoking a constructor with no arguments 🔧
251
+ * https://eslint.org/docs/rules/new-parens
252
+ */
253
+ "new-parens": "error",
254
+ /**
255
+ * enforces new line after each method call in the chain
256
+ * to make it more readable and easy to maintain 🔧
257
+ * https://eslint.org/docs/rules/newline-per-chained-call
258
+ */
259
+ "newline-per-chained-call": "error",
260
+ /**
261
+ * disallow use of the Array constructor
262
+ * https://eslint.org/docs/rules/no-array-constructor
263
+ * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-array-constructor.md
264
+ */
265
+ "no-array-constructor": "off",
266
+ "@typescript-eslint/no-array-constructor": "error",
267
+ /**
268
+ * disallow use of bitwise operators
269
+ * https://eslint.org/docs/rules/no-bitwise
270
+ */
271
+ "no-bitwise": "warn",
272
+ /**
273
+ * disallow use of the continue statement
274
+ * https://eslint.org/docs/rules/no-continue
275
+ */
276
+ "no-continue": "error",
277
+ /**
278
+ * disallow comments inline after code
279
+ * https://eslint.org/docs/rules/no-inline-comments
280
+ */
281
+ "no-inline-comments": "error",
282
+ /**
283
+ * disallow if as the only statement in an else block 🔧
284
+ * https://eslint.org/docs/rules/no-lonely-if
285
+ */
286
+ "no-lonely-if": "error",
287
+ /**
288
+ * disallow un-paren'd mixes of different operators
289
+ * https://eslint.org/docs/rules/no-mixed-operators
290
+ */
291
+ "no-mixed-operators": "error",
292
+ /**
293
+ * disallow mixed spaces and tabs for indentation ✅
294
+ * https://eslint.org/docs/rules/no-mixed-spaces-and-tabs
295
+ */
296
+ "no-mixed-spaces-and-tabs": "error",
297
+ /**
298
+ * disallow use of chained assignment expressions
299
+ * https://eslint.org/docs/rules/no-multi-assign
300
+ */
301
+ "no-multi-assign": "error",
302
+ /**
303
+ * disallow multiple empty lines, only one newline at the end, and no new lines at the beginning 🔧
304
+ * https://eslint.org/docs/rules/no-multiple-empty-lines
305
+ */
306
+ "no-multiple-empty-lines": ["error", { max: 1, maxBOF: 0, maxEOF: 0 }],
307
+ /**
308
+ * disallow negated conditions
309
+ * https://eslint.org/docs/rules/no-negated-condition
310
+ */
311
+ "no-negated-condition": "off",
312
+ /**
313
+ * disallow nested ternary expressions
314
+ * https://eslint.org/docs/rules/no-nested-ternary
315
+ */
316
+ "no-nested-ternary": "error",
317
+ /**
318
+ * disallow use of the Object constructor
319
+ * https://eslint.org/docs/rules/no-new-object
320
+ */
321
+ "no-new-object": "error",
322
+ /**
323
+ * disallow use of unary operators, ++ and --
324
+ * https://eslint.org/docs/rules/no-plusplus
325
+ */
326
+ "no-plusplus": "error",
327
+ /**
328
+ * disallow certain syntax forms
329
+ * https://eslint.org/docs/rules/no-restricted-syntax
330
+ */
331
+ "no-restricted-syntax": [
332
+ "error",
211
333
  {
212
- selector: 'ForInStatement',
213
- message: 'for-in loops are disallowed. (https://github.com/SPSCommerce/javascript#iterators--no-for-in)',
334
+ selector: "ForInStatement",
335
+ message: "for-in loops are disallowed. (https://github.com/SPSCommerce/javascript#iterators--no-for-in)",
214
336
  },
215
337
  {
216
- selector: 'LabeledStatement',
217
- message: 'Labeled statements are disallowed. (https://github.com/SPSCommerce/javascript#control-statements--value-selection)',
338
+ selector: "LabeledStatement",
339
+ message: "Labeled statements are disallowed. (https://github.com/SPSCommerce/javascript#control-statements--value-selection)",
218
340
  },
219
341
  ],
220
- /** disallow tab characters entirely
221
- * https://eslint.org/docs/rules/no-tabs */
222
- 'no-tabs': 'error',
223
- /** disallow the use of ternary operators
224
- * https://eslint.org/docs/rules/no-ternary */
225
- 'no-ternary': 'off',
226
- /** disallow trailing whitespace at the end of lines
227
- * https://eslint.org/docs/rules/no-trailing-spaces */
228
- 'no-trailing-spaces': 'error',
229
- /** disallow dangling underscores in identifiers
230
- * https://eslint.org/docs/rules/no-underscore-dangle */
231
- 'no-underscore-dangle': ['error', { enforceInMethodNames: true }],
232
- /** prefer `a || b` over `a ? a : b`
233
- * https://eslint.org/docs/rules/no-unneeded-ternary */
234
- 'no-unneeded-ternary': ['error', { defaultAssignment: false }],
235
- /** disallow whitespace before properties
236
- * https://eslint.org/docs/rules/no-whitespace-before-property */
237
- 'no-whitespace-before-property': 'error',
238
- /** enforce the location of single-line statements
239
- * https://eslint.org/docs/rules/nonblock-statement-body-position */
240
- 'nonblock-statement-body-position': 'error',
241
- /** enforce line breaks between braces
242
- * https://eslint.org/docs/rules/object-curly-newline */
243
- 'object-curly-newline': [
244
- 'error',
342
+ /**
343
+ * disallow tab characters entirely
344
+ * https://eslint.org/docs/rules/no-tabs
345
+ */
346
+ "no-tabs": "error",
347
+ /**
348
+ * disallow the use of ternary operators
349
+ * https://eslint.org/docs/rules/no-ternary
350
+ */
351
+ "no-ternary": "off",
352
+ /**
353
+ * disallow trailing whitespace at the end of lines 🔧
354
+ * https://eslint.org/docs/rules/no-trailing-spaces
355
+ */
356
+ "no-trailing-spaces": "error",
357
+ /**
358
+ * disallow dangling underscores in identifiers
359
+ * https://eslint.org/docs/rules/no-underscore-dangle
360
+ */
361
+ "no-underscore-dangle": ["error", { enforceInMethodNames: true }],
362
+ /**
363
+ * prefer `a || b` over `a ? a : b` 🔧
364
+ * https://eslint.org/docs/rules/no-unneeded-ternary
365
+ */
366
+ "no-unneeded-ternary": ["error", { defaultAssignment: false }],
367
+ /**
368
+ * disallow whitespace before properties 🔧
369
+ * https://eslint.org/docs/rules/no-whitespace-before-property
370
+ */
371
+ "no-whitespace-before-property": "error",
372
+ /**
373
+ * enforce the location of single-line statements 🔧
374
+ * https://eslint.org/docs/rules/nonblock-statement-body-position
375
+ */
376
+ "nonblock-statement-body-position": "error",
377
+ /**
378
+ * enforce line breaks between braces 🔧
379
+ * https://eslint.org/docs/rules/object-curly-newline
380
+ */
381
+ "object-curly-newline": [
382
+ "error",
245
383
  {
246
384
  minProperties: 4,
247
385
  multiline: true,
248
386
  consistent: true,
249
387
  },
250
388
  ],
251
- /** require padding inside curly braces
252
- * https://eslint.org/docs/rules/object-curly-spacing
253
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/object-curly-spacing.md */
254
- 'object-curly-spacing': 'off',
255
- '@typescript-eslint/object-curly-spacing': ['error', 'always'],
256
- /** enforce "same line" or "multiple line" on object properties.
257
- * https://eslint.org/docs/rules/object-property-newline */
258
- 'object-property-newline': ['error', { allowAllPropertiesOnSameLine: true }],
259
- /** allow just one variable declaration per function
260
- * https://eslint.org/docs/rules/one-var
261
- * nb: despite 'var' being in the name, does apply to let and const */
262
- 'one-var': ['error', 'never'],
263
- /** require a newline around variable declaration
264
- * https://eslint.org/docs/rules/one-var-declaration-per-line */
265
- 'one-var-declaration-per-line': ['error', 'always'],
266
- /** require assignment operator shorthand where possible or prohibit it entirely
267
- * https://eslint.org/docs/rules/operator-assignment */
268
- 'operator-assignment': 'error',
269
- /** Requires operator at the beginning of the line in multiline statements
270
- * https://eslint.org/docs/rules/operator-linebreak */
271
- 'operator-linebreak': ['error', 'before', { overrides: { '=': 'none' } }],
272
- /** disallow padding within blocks
273
- * https://eslint.org/docs/rules/padded-blocks */
274
- 'padded-blocks': [
275
- 'error',
389
+ /**
390
+ * require padding inside curly braces 🔧
391
+ * https://eslint.org/docs/rules/object-curly-spacing
392
+ * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/object-curly-spacing.md
393
+ */
394
+ "object-curly-spacing": "off",
395
+ "@typescript-eslint/object-curly-spacing": ["error", "always"],
396
+ /**
397
+ * enforce "same line" or "multiple line" on object properties. 🔧
398
+ * https://eslint.org/docs/rules/object-property-newline
399
+ */
400
+ "object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }],
401
+ /**
402
+ * allow just one variable declaration per function 🔧
403
+ * https://eslint.org/docs/rules/one-var
404
+ * nb: despite 'var' being in the name, does apply to let and const
405
+ */
406
+ "one-var": ["error", "never"],
407
+ /**
408
+ * require a newline around variable declaration 🔧
409
+ * https://eslint.org/docs/rules/one-var-declaration-per-line
410
+ */
411
+ "one-var-declaration-per-line": ["error", "always"],
412
+ /**
413
+ * require assignment operator shorthand where possible or prohibit it entirely 🔧
414
+ * https://eslint.org/docs/rules/operator-assignment
415
+ */
416
+ "operator-assignment": "error",
417
+ /**
418
+ * Requires operator at the beginning of the line in multiline statements 🔧
419
+ * https://eslint.org/docs/rules/operator-linebreak
420
+ */
421
+ "operator-linebreak": ["error",
422
+ "before",
423
+ { overrides: { "=": "none" } }],
424
+ /**
425
+ * disallow padding within blocks 🔧
426
+ * https://eslint.org/docs/rules/padded-blocks
427
+ */
428
+ "padded-blocks": [
429
+ "error",
276
430
  {
277
- blocks: 'never',
278
- classes: 'never',
279
- switches: 'never',
431
+ blocks: "never",
432
+ classes: "never",
433
+ switches: "never",
280
434
  },
281
435
  {
282
436
  allowSingleLineBlocks: true,
283
437
  },
284
438
  ],
285
- /** Require or disallow padding lines between statements
286
- * https://eslint.org/docs/rules/padding-line-between-statements
287
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/padding-line-between-statements.md */
288
- 'padding-line-between-statements': 'off',
289
- '@typescript-eslint/padding-line-between-statements': 'off',
290
- /** Disallow the use of Math.pow in favor of the ** operator
291
- * https://eslint.org/docs/rules/prefer-exponentiation-operator */
292
- 'prefer-exponentiation-operator': 'off',
293
- /** Prefer use of an object spread over Object.assign
294
- * https://eslint.org/docs/rules/prefer-object-spread */
295
- 'prefer-object-spread': 'error',
296
- /** require quotes around object literal property names
297
- * https://eslint.org/docs/rules/quote-props */
298
- 'quote-props': ['error', 'as-needed', { keywords: false, numbers: false }],
299
- /** specify whether double or single quotes should be used
300
- * https://eslint.org/docs/rules/quotes
301
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/quotes.md */
302
- quotes: 'off',
303
- '@typescript-eslint/quotes': ['error', 'double', { avoidEscape: true }],
304
- /** require or disallow use of semicolons instead of ASI
305
- * https://eslint.org/docs/rules/
306
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/semi.md */
307
- semi: 'off',
308
- '@typescript-eslint/semi': 'error',
309
- /** enforce spacing before and after semicolons
310
- * https://eslint.org/docs/rules/semi-spacing */
311
- 'semi-spacing': 'error',
312
- /** Enforce location of semicolons
313
- * https://eslint.org/docs/rules/semi-style */
314
- 'semi-style': 'error',
315
- /** requires object keys to be sorted
316
- * https://eslint.org/docs/rules/sort-keys */
317
- 'sort-keys': 'off',
318
- /** sort variables within the same declaration block
319
- * https://eslint.org/docs/rules/sort-vars */
320
- 'sort-vars': 'off',
321
- /** require or disallow space before blocks
322
- * https://eslint.org/docs/rules/space-before-blocks */
323
- 'space-before-blocks': 'error',
324
- /** require or disallow space before function opening parenthesis
325
- * https://eslint.org/docs/rules/space-before-function-paren
326
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-before-function-paren.md */
327
- 'space-before-function-paren': 'off',
328
- '@typescript-eslint/space-before-function-paren': [
329
- 'error',
439
+ /**
440
+ * Require or disallow padding lines between statements 🔧
441
+ * https://eslint.org/docs/rules/padding-line-between-statements
442
+ * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/padding-line-between-statements.md
443
+ */
444
+ "padding-line-between-statements": "off",
445
+ "@typescript-eslint/padding-line-between-statements": "off",
446
+ /**
447
+ * Disallow the use of Math.pow in favor of the ** operator 🔧
448
+ * https://eslint.org/docs/rules/prefer-exponentiation-operator
449
+ */
450
+ "prefer-exponentiation-operator": "off",
451
+ /**
452
+ * Prefer use of an object spread over Object.assign 🔧
453
+ * https://eslint.org/docs/rules/prefer-object-spread
454
+ */
455
+ "prefer-object-spread": "error",
456
+ /**
457
+ * require quotes around object literal property names 🔧
458
+ * https://eslint.org/docs/rules/quote-props
459
+ */
460
+ "quote-props": ["error",
461
+ "as-needed",
462
+ { keywords: false, numbers: false }],
463
+ /**
464
+ * specify whether double or single quotes should be used 🔧
465
+ * https://eslint.org/docs/rules/quotes
466
+ * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/quotes.md
467
+ */
468
+ quotes: "off",
469
+ "@typescript-eslint/quotes": ["error",
470
+ "double",
471
+ { avoidEscape: true }],
472
+ /**
473
+ * require or disallow use of semicolons instead of ASI 🔧
474
+ * https://eslint.org/docs/rules/
475
+ * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/semi.md
476
+ */
477
+ semi: "off",
478
+ "@typescript-eslint/semi": "error",
479
+ /**
480
+ * enforce spacing before and after semicolons 🔧
481
+ * https://eslint.org/docs/rules/semi-spacing
482
+ */
483
+ "semi-spacing": "error",
484
+ /**
485
+ * Enforce location of semicolons 🔧
486
+ * https://eslint.org/docs/rules/semi-style
487
+ */
488
+ "semi-style": "error",
489
+ /**
490
+ * requires object keys to be sorted
491
+ * https://eslint.org/docs/rules/sort-keys
492
+ */
493
+ "sort-keys": "off",
494
+ /**
495
+ * sort variables within the same declaration block 🔧
496
+ * https://eslint.org/docs/rules/sort-vars
497
+ */
498
+ "sort-vars": "off",
499
+ /**
500
+ * require or disallow space before blocks 🔧
501
+ * https://eslint.org/docs/rules/space-before-blocks
502
+ */
503
+ "space-before-blocks": "error",
504
+ /**
505
+ * require or disallow space before function opening parenthesis 🔧
506
+ * https://eslint.org/docs/rules/space-before-function-paren
507
+ * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-before-function-paren.md
508
+ */
509
+ "space-before-function-paren": "off",
510
+ "@typescript-eslint/space-before-function-paren": [
511
+ "error",
330
512
  {
331
- anonymous: 'always',
332
- named: 'never',
333
- asyncArrow: 'always'
513
+ anonymous: "always",
514
+ named: "never",
515
+ asyncArrow: "always",
334
516
  },
335
517
  ],
336
- /** require or disallow spaces inside parentheses
337
- * https://eslint.org/docs/rules/space-in-parens */
338
- 'space-in-parens': 'error',
339
- /** require spaces around operators
340
- * https://eslint.org/docs/rules/space-infix-ops
341
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-infix-ops.md */
342
- 'space-infix-ops': 'off',
343
- '@typescript-eslint/space-infix-ops': 'error',
344
- /** Require or disallow spaces before/after unary operators
345
- * https://eslint.org/docs/rules/space-unary-ops */
346
- 'space-unary-ops': 'error',
347
- /** require or disallow a space immediately following the // or /* in a comment
348
- * https://eslint.org/docs/rules/spaced-comment */
349
- 'spaced-comment': 'error',
350
- /** Enforce spacing around colons of switch statements
351
- * https://eslint.org/docs/rules/switch-colon-spacing */
352
- 'switch-colon-spacing': 'error',
353
- /** Require or disallow spacing between template tags and their literals
354
- * https://eslint.org/docs/rules/template-tag-spacing */
355
- 'template-tag-spacing': 'error',
356
- /** require or disallow the Unicode Byte Order Mark
357
- * https://eslint.org/docs/rules/unicode-bom */
358
- 'unicode-bom': 'error',
359
- /** require regex literals to be wrapped in parentheses
360
- * https://eslint.org/docs/rules/wrap-regex */
361
- 'wrap-regex': 'off'
518
+ /**
519
+ * require or disallow spaces inside parentheses 🔧
520
+ * https://eslint.org/docs/rules/space-in-parens
521
+ */
522
+ "space-in-parens": "error",
523
+ /**
524
+ * require spaces around operators 🔧
525
+ * https://eslint.org/docs/rules/space-infix-ops
526
+ * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-infix-ops.md
527
+ */
528
+ "space-infix-ops": "off",
529
+ "@typescript-eslint/space-infix-ops": "error",
530
+ /**
531
+ * Require or disallow spaces before/after unary operators 🔧
532
+ * https://eslint.org/docs/rules/space-unary-ops
533
+ */
534
+ "space-unary-ops": "error",
535
+ /**
536
+ * require or disallow a space immediately following the // or /* in a comment 🔧
537
+ * https://eslint.org/docs/rules/spaced-comment
538
+ */
539
+ "spaced-comment": "error",
540
+ /**
541
+ * Enforce spacing around colons of switch statements 🔧
542
+ * https://eslint.org/docs/rules/switch-colon-spacing
543
+ */
544
+ "switch-colon-spacing": "error",
545
+ /**
546
+ * Require or disallow spacing between template tags and their literals 🔧
547
+ * https://eslint.org/docs/rules/template-tag-spacing
548
+ */
549
+ "template-tag-spacing": "error",
550
+ /**
551
+ * require or disallow the Unicode Byte Order Mark 🔧
552
+ * https://eslint.org/docs/rules/unicode-bom
553
+ */
554
+ "unicode-bom": "error",
555
+ /**
556
+ * require regex literals to be wrapped in parentheses 🔧
557
+ * https://eslint.org/docs/rules/wrap-regex
558
+ */
559
+ "wrap-regex": "off",
362
560
  };