@storm-software/eslint 0.107.1 → 0.107.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.
Files changed (74) hide show
  1. package/README.md +1 -1
  2. package/dist/chunk-723HQUNP.js +14 -0
  3. package/dist/chunk-E7T4SNH3.js +1332 -0
  4. package/dist/chunk-ESFBJFNU.cjs +149 -0
  5. package/dist/chunk-FTXILLLE.js +24 -0
  6. package/dist/chunk-JS7W7LMD.cjs +14 -0
  7. package/dist/chunk-KND2ZTLT.cjs +49 -0
  8. package/dist/chunk-LSG5T3ZK.js +313 -0
  9. package/dist/chunk-NFPQICLG.cjs +1332 -0
  10. package/dist/chunk-OGGLIE6C.cjs +24 -0
  11. package/dist/chunk-QDLKHXPX.cjs +11 -0
  12. package/dist/chunk-RTM5LCEB.js +149 -0
  13. package/dist/chunk-SHUYVCID.js +6 -0
  14. package/dist/chunk-TXTXUVRZ.cjs +313 -0
  15. package/dist/chunk-VJ6CKC4P.js +37 -0
  16. package/dist/chunk-Y67QTC5U.js +49 -0
  17. package/dist/chunk-YQQ366F7.cjs +37 -0
  18. package/dist/preset.cjs +427 -112
  19. package/dist/preset.d.cts +1 -6
  20. package/dist/preset.d.ts +1 -6
  21. package/dist/preset.js +360 -12
  22. package/dist/rules/import.cjs +292 -0
  23. package/dist/rules/import.d.cts +5 -0
  24. package/dist/rules/import.d.ts +5 -0
  25. package/dist/rules/import.js +292 -0
  26. package/dist/rules/jsx-a11y.cjs +341 -0
  27. package/dist/rules/jsx-a11y.d.cts +5 -0
  28. package/dist/rules/jsx-a11y.d.ts +5 -0
  29. package/dist/rules/jsx-a11y.js +341 -0
  30. package/dist/rules/react-hooks.cjs +15 -0
  31. package/dist/rules/react-hooks.d.cts +5 -0
  32. package/dist/rules/react-hooks.d.ts +5 -0
  33. package/dist/rules/react-hooks.js +15 -0
  34. package/dist/rules/react.cjs +689 -0
  35. package/dist/rules/react.d.cts +5 -0
  36. package/dist/rules/react.d.ts +5 -0
  37. package/dist/rules/react.js +689 -0
  38. package/dist/rules/storm.cjs +7 -0
  39. package/dist/rules/storm.d.cts +11 -0
  40. package/dist/rules/storm.d.ts +11 -0
  41. package/dist/rules/storm.js +7 -0
  42. package/dist/rules/ts-docs.cjs +7 -0
  43. package/dist/rules/ts-docs.d.cts +5 -0
  44. package/dist/rules/ts-docs.d.ts +5 -0
  45. package/dist/rules/ts-docs.js +7 -0
  46. package/dist/utils/banner-plugin.cjs +9 -0
  47. package/dist/utils/banner-plugin.d.cts +6 -0
  48. package/dist/utils/banner-plugin.d.ts +6 -0
  49. package/dist/utils/banner-plugin.js +9 -0
  50. package/dist/utils/constants.cjs +25 -0
  51. package/dist/utils/constants.d.cts +24 -0
  52. package/dist/utils/constants.d.ts +24 -0
  53. package/dist/utils/constants.js +25 -0
  54. package/dist/utils/create-flat-import-plugin.cjs +20 -0
  55. package/dist/utils/create-flat-import-plugin.d.cts +11 -0
  56. package/dist/utils/create-flat-import-plugin.d.ts +11 -0
  57. package/dist/utils/create-flat-import-plugin.js +20 -0
  58. package/dist/utils/format-config.cjs +7 -0
  59. package/dist/utils/format-config.d.cts +5 -0
  60. package/dist/utils/format-config.d.ts +5 -0
  61. package/dist/utils/format-config.js +7 -0
  62. package/dist/utils/get-file-banner.cjs +8 -0
  63. package/dist/utils/get-file-banner.d.cts +9 -0
  64. package/dist/utils/get-file-banner.d.ts +9 -0
  65. package/dist/utils/get-file-banner.js +8 -0
  66. package/dist/utils/ignores.cjs +7 -0
  67. package/dist/utils/ignores.d.cts +3 -0
  68. package/dist/utils/ignores.d.ts +3 -0
  69. package/dist/utils/ignores.js +7 -0
  70. package/dist/utils/index.cjs +33 -0
  71. package/dist/utils/index.d.cts +4 -0
  72. package/dist/utils/index.d.ts +4 -0
  73. package/dist/utils/index.js +33 -0
  74. package/package.json +1 -1
@@ -0,0 +1,1332 @@
1
+ import {
2
+ __name
3
+ } from "./chunk-SHUYVCID.js";
4
+
5
+ // src/rules/storm.ts
6
+ var getStormRulesConfig = /* @__PURE__ */ __name((options) => {
7
+ let rules = {
8
+ /*************************************************************
9
+ *
10
+ * Base Rules - The core rules that lint for common problems
11
+ *
12
+ **************************************************************/
13
+ /**
14
+ * Require return statements in array methods callbacks.
15
+ *
16
+ * 🚫 Not fixable -https://eslint.org/docs/rules/array-callback-return
17
+ */
18
+ "array-callback-return": [
19
+ "error",
20
+ {
21
+ allowImplicit: true
22
+ }
23
+ ],
24
+ /**
25
+ * Treat `var` statements as if they were block scoped.
26
+ *
27
+ * 🚫 Not fixable - https://eslint.org/docs/rules/block-scoped-var
28
+ */
29
+ "block-scoped-var": "error",
30
+ /**
31
+ * Require curly braces for multiline blocks.
32
+ *
33
+ * 🔧 Fixable - https://eslint.org/docs/rules/curly
34
+ */
35
+ curly: [
36
+ "warn",
37
+ "multi-line"
38
+ ],
39
+ /**
40
+ * Require default clauses in switch statements to be last (if used).
41
+ *
42
+ * 🚫 Not fixable - https://eslint.org/docs/rules/default-case-last
43
+ */
44
+ "default-case-last": "error",
45
+ /**
46
+ * Require triple equals (`===` and `!==`).
47
+ *
48
+ * 🔧 Fixable - https://eslint.org/docs/rules/eqeqeq
49
+ */
50
+ eqeqeq: "error",
51
+ /**
52
+ * Require grouped accessor pairs in object literals and classes.
53
+ *
54
+ * 🚫 Not fixable - https://eslint.org/docs/rules/grouped-accessor-pairs
55
+ */
56
+ "grouped-accessor-pairs": "error",
57
+ /**
58
+ * Disallow use of `alert()`.
59
+ *
60
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-alert
61
+ */
62
+ "no-alert": "error",
63
+ /**
64
+ * Disallow use of `caller`/`callee`.
65
+ *
66
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-caller
67
+ */
68
+ "no-caller": "error",
69
+ /**
70
+ * Disallow returning value in constructor.
71
+ *
72
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-constructor-return
73
+ */
74
+ "no-constructor-return": "error",
75
+ /**
76
+ * Disallow using an `else` if the `if` block contains a return.
77
+ *
78
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-else-return
79
+ */
80
+ "no-else-return": "warn",
81
+ /**
82
+ * Disallow `eval()`.
83
+ *
84
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-eval
85
+ */
86
+ "no-eval": "warn",
87
+ /**
88
+ * Disallow extending native objects.
89
+ *
90
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-extend-native
91
+ */
92
+ "no-extend-native": "error",
93
+ /**
94
+ * Disallow unnecessary function binding.
95
+ *
96
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-bind
97
+ */
98
+ "no-extra-bind": "error",
99
+ /**
100
+ * Disallow unnecessary labels.
101
+ *
102
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-label
103
+ */
104
+ "no-extra-label": "error",
105
+ /**
106
+ * Disallow floating decimals.
107
+ *
108
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-floating-decimal
109
+ */
110
+ "no-floating-decimal": "error",
111
+ /**
112
+ * Make people convert types explicitly e.g. `Boolean(foo)` instead of `!!foo`.
113
+ *
114
+ * 🔧 Partially Fixable - https://eslint.org/docs/rules/no-implicit-coercion
115
+ */
116
+ "no-implicit-coercion": "error",
117
+ /**
118
+ * Disallow use of `eval()`-like methods.
119
+ *
120
+ * https://eslint.org/docs/rules/no-implied-eval
121
+ */
122
+ "no-implied-eval": "error",
123
+ /**
124
+ * Disallow usage of `__iterator__` property.
125
+ *
126
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-iterator
127
+ */
128
+ "no-iterator": "error",
129
+ /**
130
+ * Disallow use of labels for anything other than loops and switches.
131
+ *
132
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-labels
133
+ */
134
+ "no-labels": [
135
+ "error"
136
+ ],
137
+ /**
138
+ * Disallow unnecessary nested blocks.
139
+ *
140
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-lone-blocks
141
+ */
142
+ "no-lone-blocks": "error",
143
+ /**
144
+ * Disallow `new` for side effects.
145
+ *
146
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-new
147
+ */
148
+ "no-new": "error",
149
+ /**
150
+ * Disallow function constructors.
151
+ *
152
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-func
153
+ */
154
+ "no-new-func": "error",
155
+ /**
156
+ * Disallow base types wrapper instances, such as `new String('foo')`.
157
+ *
158
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-wrappers
159
+ */
160
+ "no-new-wrappers": "error",
161
+ /**
162
+ * Disallow use of octal escape sequences in string literals.
163
+ *
164
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-octal-escape
165
+ */
166
+ "no-octal-escape": "error",
167
+ /**
168
+ * Disallow reassignment of function parameters.
169
+ *
170
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-param-reassign
171
+ */
172
+ "no-param-reassign": "off",
173
+ /**
174
+ * Disallow usage of the deprecated `__proto__` property.
175
+ *
176
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-proto
177
+ */
178
+ "no-proto": "error",
179
+ /**
180
+ * Disallow assignment in `return` statement.
181
+ *
182
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-return-assign
183
+ */
184
+ "no-return-assign": "error",
185
+ /**
186
+ * Disallows unnecessary `return await`.
187
+ *
188
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-return-await
189
+ */
190
+ "no-return-await": "error",
191
+ /**
192
+ * Disallow use of `javascript:` urls.
193
+ *
194
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-script-url
195
+ */
196
+ "no-script-url": "error",
197
+ /**
198
+ * Disallow comparisons where both sides are exactly the same.
199
+ *
200
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-self-compare
201
+ */
202
+ "no-self-compare": "error",
203
+ /**
204
+ * Disallow use of comma operator.
205
+ *
206
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-sequences
207
+ */
208
+ "no-sequences": "error",
209
+ /**
210
+ * Disallow unnecessary `.call()` and `.apply()`.
211
+ *
212
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-useless-call
213
+ */
214
+ "no-useless-call": "error",
215
+ /**
216
+ * Disallow unnecessary concatenation of strings.
217
+ *
218
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-useless-concat
219
+ */
220
+ "no-useless-concat": "error",
221
+ /**
222
+ * Disallow redundant return statements.
223
+ *
224
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-useless-return
225
+ */
226
+ "no-useless-return": "warn",
227
+ /**
228
+ * Require using named capture groups in regular expressions.
229
+ *
230
+ * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-named-capture-group
231
+ */
232
+ "prefer-named-capture-group": "error",
233
+ /**
234
+ * Require using Error objects as Promise rejection reasons.
235
+ *
236
+ * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-promise-reject-errors
237
+ */
238
+ "prefer-promise-reject-errors": [
239
+ "error",
240
+ {
241
+ allowEmptyReject: true
242
+ }
243
+ ],
244
+ /**
245
+ * Disallow use of the RegExp constructor in favor of regular expression
246
+ * literals.
247
+ *
248
+ * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-regex-literals
249
+ */
250
+ "prefer-regex-literals": "error",
251
+ /**
252
+ * Disallow "Yoda conditions", ensuring the comparison.
253
+ *
254
+ * 🔧 Fixable - https://eslint.org/docs/rules/yoda
255
+ */
256
+ yoda: "warn",
257
+ // Enforce “for” loop update clause moving the counter in the right direction
258
+ // https://eslint.org/docs/rules/for-direction
259
+ "for-direction": "error",
260
+ // Enforces that a return statement is present in property getters
261
+ // https://eslint.org/docs/rules/getter-return
262
+ "getter-return": [
263
+ "error",
264
+ {
265
+ allowImplicit: true
266
+ }
267
+ ],
268
+ // disallow using an async function as a Promise executor
269
+ // https://eslint.org/docs/rules/no-async-promise-executor
270
+ "no-async-promise-executor": "error",
271
+ // Disallow await inside of loops
272
+ // https://eslint.org/docs/rules/no-await-in-loop
273
+ "no-await-in-loop": "error",
274
+ // Disallow comparisons to negative zero
275
+ // https://eslint.org/docs/rules/no-compare-neg-zero
276
+ "no-compare-neg-zero": "error",
277
+ // disallow assignment in conditional expressions
278
+ "no-cond-assign": [
279
+ "error",
280
+ "always"
281
+ ],
282
+ // disallow use of console
283
+ "no-console": "error",
284
+ // Disallows expressions where the operation doesn't affect the value
285
+ // https://eslint.org/docs/rules/no-constant-binary-expression
286
+ // TODO: semver-major, enable
287
+ "no-constant-binary-expression": "off",
288
+ // disallow use of constant expressions in conditions
289
+ "no-constant-condition": "warn",
290
+ // disallow control characters in regular expressions
291
+ "no-control-regex": "error",
292
+ // disallow use of debugger
293
+ "no-debugger": "warn",
294
+ // disallow duplicate arguments in functions
295
+ "no-dupe-args": "error",
296
+ // Disallow duplicate conditions in if-else-if chains
297
+ // https://eslint.org/docs/rules/no-dupe-else-if
298
+ "no-dupe-else-if": "error",
299
+ // disallow duplicate keys when creating object literals
300
+ "no-dupe-keys": "error",
301
+ // disallow a duplicate case label.
302
+ "no-duplicate-case": "error",
303
+ // disallow empty statements
304
+ "no-empty": "error",
305
+ // disallow the use of empty character classes in regular expressions
306
+ "no-empty-character-class": "error",
307
+ // disallow assigning to the exception in a catch block
308
+ "no-ex-assign": "error",
309
+ // disallow double-negation boolean casts in a boolean context
310
+ // https://eslint.org/docs/rules/no-extra-boolean-cast
311
+ "no-extra-boolean-cast": "error",
312
+ // disallow unnecessary parentheses
313
+ // https://eslint.org/docs/rules/no-extra-parens
314
+ "no-extra-parens": [
315
+ "off",
316
+ "all",
317
+ {
318
+ conditionalAssign: true,
319
+ nestedBinaryExpressions: false,
320
+ returnAssign: false,
321
+ ignoreJSX: "all",
322
+ enforceForArrowConditionals: false
323
+ }
324
+ ],
325
+ // disallow unnecessary semicolons
326
+ "no-extra-semi": "error",
327
+ // disallow overwriting functions written as function declarations
328
+ "no-func-assign": "off",
329
+ // https://eslint.org/docs/rules/no-import-assign
330
+ "no-import-assign": "error",
331
+ // disallow function or variable declarations in nested blocks
332
+ "no-inner-declarations": "warn",
333
+ // disallow invalid regular expression strings in the RegExp constructor
334
+ "no-invalid-regexp": "error",
335
+ // disallow irregular whitespace outside of strings and comments
336
+ "no-irregular-whitespace": "error",
337
+ // Disallow Number Literals That Lose Precision
338
+ // https://eslint.org/docs/rules/no-loss-of-precision
339
+ "no-loss-of-precision": "error",
340
+ // Disallow characters which are made with multiple code points in character class syntax
341
+ // https://eslint.org/docs/rules/no-misleading-character-class
342
+ "no-misleading-character-class": "error",
343
+ // disallow the use of object properties of the global object (Math and JSON) as functions
344
+ "no-obj-calls": "error",
345
+ // Disallow new operators with global non-constructor functions
346
+ // https://eslint.org/docs/latest/rules/no-new-native-nonconstructor
347
+ // TODO: semver-major, enable
348
+ "no-new-native-nonconstructor": "off",
349
+ // Disallow returning values from Promise executor functions
350
+ // https://eslint.org/docs/rules/no-promise-executor-return
351
+ "no-promise-executor-return": "error",
352
+ // disallow use of Object.prototypes builtins directly
353
+ // https://eslint.org/docs/rules/no-prototype-builtins
354
+ "no-prototype-builtins": "error",
355
+ // disallow multiple spaces in a regular expression literal
356
+ "no-regex-spaces": "error",
357
+ // Disallow returning values from setters
358
+ // https://eslint.org/docs/rules/no-setter-return
359
+ "no-setter-return": "error",
360
+ // disallow sparse arrays
361
+ "no-sparse-arrays": "error",
362
+ // Disallow template literal placeholder syntax in regular strings
363
+ // https://eslint.org/docs/rules/no-template-curly-in-string
364
+ "no-template-curly-in-string": "error",
365
+ // Avoid code that looks like two expressions but is actually one
366
+ // https://eslint.org/docs/rules/no-unexpected-multiline
367
+ "no-unexpected-multiline": "error",
368
+ // disallow unreachable statements after a return, throw, continue, or break statement
369
+ "no-unreachable": "error",
370
+ // Disallow loops with a body that allows only one iteration
371
+ // https://eslint.org/docs/rules/no-unreachable-loop
372
+ "no-unreachable-loop": [
373
+ "error",
374
+ {
375
+ ignore: []
376
+ // WhileStatement, DoWhileStatement, ForStatement, ForInStatement, ForOfStatement
377
+ }
378
+ ],
379
+ // disallow return/throw/break/continue inside finally blocks
380
+ // https://eslint.org/docs/rules/no-unsafe-finally
381
+ "no-unsafe-finally": "error",
382
+ // disallow negating the left operand of relational operators
383
+ // https://eslint.org/docs/rules/no-unsafe-negation
384
+ "no-unsafe-negation": "error",
385
+ // disallow use of optional chaining in contexts where the undefined value is not allowed
386
+ // https://eslint.org/docs/rules/no-unsafe-optional-chaining
387
+ "no-unsafe-optional-chaining": [
388
+ "error",
389
+ {
390
+ disallowArithmeticOperators: true
391
+ }
392
+ ],
393
+ // Disallow Unused Private Class Members
394
+ // https://eslint.org/docs/rules/no-unused-private-class-members
395
+ // TODO: enable once eslint 7 is dropped (which is semver-major)
396
+ "no-unused-private-class-members": "off",
397
+ // Disallow useless backreferences in regular expressions
398
+ // https://eslint.org/docs/rules/no-useless-backreference
399
+ "no-useless-backreference": "error",
400
+ // disallow negation of the left operand of an in expression
401
+ // deprecated in favor of no-unsafe-negation
402
+ "no-negated-in-lhs": "off",
403
+ // Disallow assignments that can lead to race conditions due to usage of await or yield
404
+ // https://eslint.org/docs/rules/require-atomic-updates
405
+ // note: not enabled because it is very buggy
406
+ "require-atomic-updates": "off",
407
+ // disallow comparisons with the value NaN
408
+ "use-isnan": "error",
409
+ // ensure JSDoc comments are valid
410
+ // https://eslint.org/docs/rules/valid-jsdoc
411
+ "valid-jsdoc": "off",
412
+ // ensure that the results of typeof are compared against a valid string
413
+ // https://eslint.org/docs/rules/valid-typeof
414
+ "valid-typeof": [
415
+ "error",
416
+ {
417
+ requireStringLiterals: true
418
+ }
419
+ ],
420
+ /*************************************************************
421
+ *
422
+ * Stylistic Rules - These rules relate to style guidelines
423
+ *
424
+ **************************************************************/
425
+ // enforce line breaks after opening and before closing array brackets
426
+ // https://eslint.org/docs/rules/array-bracket-newline
427
+ // TODO: enable? semver-major
428
+ "array-bracket-newline": [
429
+ "off",
430
+ "consistent"
431
+ ],
432
+ // enforce line breaks between array elements
433
+ // https://eslint.org/docs/rules/array-element-newline
434
+ // TODO: enable? semver-major
435
+ "array-element-newline": [
436
+ "off",
437
+ {
438
+ multiline: true,
439
+ minItems: 3
440
+ }
441
+ ],
442
+ // enforce spacing inside array brackets
443
+ "array-bracket-spacing": [
444
+ "error",
445
+ "never"
446
+ ],
447
+ // enforce spacing inside single-line blocks
448
+ // https://eslint.org/docs/rules/block-spacing
449
+ "block-spacing": [
450
+ "error",
451
+ "always"
452
+ ],
453
+ // enforce one true brace style
454
+ "brace-style": [
455
+ "error",
456
+ "1tbs",
457
+ {
458
+ allowSingleLine: true
459
+ }
460
+ ],
461
+ // require camel case names
462
+ camelcase: [
463
+ "error",
464
+ {
465
+ properties: "never",
466
+ ignoreDestructuring: false
467
+ }
468
+ ],
469
+ // enforce or disallow capitalization of the first letter of a comment
470
+ // https://eslint.org/docs/rules/capitalized-comments
471
+ "capitalized-comments": [
472
+ "off",
473
+ "never",
474
+ {
475
+ line: {
476
+ ignorePattern: ".*",
477
+ ignoreInlineComments: true,
478
+ ignoreConsecutiveComments: true
479
+ },
480
+ block: {
481
+ ignorePattern: ".*",
482
+ ignoreInlineComments: true,
483
+ ignoreConsecutiveComments: true
484
+ }
485
+ }
486
+ ],
487
+ // require trailing commas in multiline object literals
488
+ "comma-dangle": [
489
+ "error",
490
+ "never"
491
+ ],
492
+ // enforce spacing before and after comma
493
+ "comma-spacing": [
494
+ "error",
495
+ {
496
+ before: false,
497
+ after: true
498
+ }
499
+ ],
500
+ // enforce one true comma style
501
+ "comma-style": [
502
+ "error",
503
+ "last",
504
+ {
505
+ exceptions: {
506
+ ArrayExpression: false,
507
+ ArrayPattern: false,
508
+ ArrowFunctionExpression: false,
509
+ CallExpression: false,
510
+ FunctionDeclaration: false,
511
+ FunctionExpression: false,
512
+ ImportDeclaration: false,
513
+ ObjectExpression: false,
514
+ ObjectPattern: false,
515
+ VariableDeclaration: false,
516
+ NewExpression: false
517
+ }
518
+ }
519
+ ],
520
+ // disallow padding inside computed properties
521
+ "computed-property-spacing": [
522
+ "error",
523
+ "never"
524
+ ],
525
+ // enforces consistent naming when capturing the current execution context
526
+ "consistent-this": "off",
527
+ // enforce newline at the end of file, with no multiple empty lines
528
+ "eol-last": [
529
+ "error",
530
+ "always"
531
+ ],
532
+ // https://eslint.org/docs/rules/function-call-argument-newline
533
+ "function-call-argument-newline": [
534
+ "error",
535
+ "consistent"
536
+ ],
537
+ // enforce spacing between functions and their invocations
538
+ // https://eslint.org/docs/rules/func-call-spacing
539
+ "func-call-spacing": [
540
+ "error",
541
+ "never"
542
+ ],
543
+ // requires function names to match the name of the variable or property to which they are
544
+ // assigned
545
+ // https://eslint.org/docs/rules/func-name-matching
546
+ "func-name-matching": [
547
+ "off",
548
+ "always",
549
+ {
550
+ includeCommonJSModuleExports: false,
551
+ considerPropertyDescriptor: true
552
+ }
553
+ ],
554
+ // require function expressions to have a name
555
+ // https://eslint.org/docs/rules/func-names
556
+ "func-names": "warn",
557
+ // enforces use of function declarations or expressions
558
+ // https://eslint.org/docs/rules/func-style
559
+ // TODO: enable
560
+ "func-style": [
561
+ "off",
562
+ "expression"
563
+ ],
564
+ // require line breaks inside function parentheses if there are line breaks between parameters
565
+ // https://eslint.org/docs/rules/function-paren-newline
566
+ "function-paren-newline": "off",
567
+ // disallow specified identifiers
568
+ // https://eslint.org/docs/rules/id-denylist
569
+ "id-denylist": "off",
570
+ // this option enforces minimum and maximum identifier lengths
571
+ // (variable names, property names etc.)
572
+ "id-length": "off",
573
+ // require identifiers to match the provided regular expression
574
+ "id-match": "off",
575
+ // Enforce the location of arrow function bodies with implicit returns
576
+ // https://eslint.org/docs/rules/implicit-arrow-linebreak
577
+ "implicit-arrow-linebreak": "off",
578
+ // this option sets a specific tab width for your code
579
+ // https://eslint.org/docs/rules/indent
580
+ indent: "off",
581
+ // "error",
582
+ // 2,
583
+ // {
584
+ // SwitchCase: 1,
585
+ // VariableDeclarator: 1,
586
+ // outerIIFEBody: 1,
587
+ // // MemberExpression: null,
588
+ // FunctionDeclaration: {
589
+ // parameters: 1,
590
+ // body: 1
591
+ // },
592
+ // FunctionExpression: {
593
+ // parameters: 1,
594
+ // body: 1
595
+ // },
596
+ // CallExpression: {
597
+ // arguments: 1
598
+ // },
599
+ // ArrayExpression: 1,
600
+ // ObjectExpression: 1,
601
+ // ImportDeclaration: 1,
602
+ // flatTernaryExpressions: false,
603
+ // // list derived from https://github.com/benjamn/ast-types/blob/HEAD/def/jsx.js
604
+ // ignoredNodes: [
605
+ // "JSXElement",
606
+ // "JSXElement > *",
607
+ // "JSXAttribute",
608
+ // "JSXIdentifier",
609
+ // "JSXNamespacedName",
610
+ // "JSXMemberExpression",
611
+ // "JSXSpreadAttribute",
612
+ // "JSXExpressionContainer",
613
+ // "JSXOpeningElement",
614
+ // "JSXClosingElement",
615
+ // "JSXFragment",
616
+ // "JSXOpeningFragment",
617
+ // "JSXClosingFragment",
618
+ // "JSXText",
619
+ // "JSXEmptyExpression",
620
+ // "JSXSpreadChild"
621
+ // ],
622
+ // ignoreComments: false
623
+ // }
624
+ // ],
625
+ // specify whether double or single quotes should be used in JSX attributes
626
+ // https://eslint.org/docs/rules/jsx-quotes
627
+ "jsx-quotes": [
628
+ "off",
629
+ "prefer-double"
630
+ ],
631
+ // enforces spacing between keys and values in object literal properties
632
+ "key-spacing": [
633
+ "error",
634
+ {
635
+ beforeColon: false,
636
+ afterColon: true
637
+ }
638
+ ],
639
+ // require a space before & after certain keywords
640
+ "keyword-spacing": [
641
+ "error",
642
+ {
643
+ before: true,
644
+ after: true,
645
+ overrides: {
646
+ return: {
647
+ after: true
648
+ },
649
+ throw: {
650
+ after: true
651
+ },
652
+ case: {
653
+ after: true
654
+ }
655
+ }
656
+ }
657
+ ],
658
+ // enforce position of line comments
659
+ // https://eslint.org/docs/rules/line-comment-position
660
+ // TODO: enable?
661
+ "line-comment-position": [
662
+ "off",
663
+ {
664
+ position: "above",
665
+ ignorePattern: "",
666
+ applyDefaultPatterns: true
667
+ }
668
+ ],
669
+ // disallow mixed 'LF' and 'CRLF' as linebreaks
670
+ // https://eslint.org/docs/rules/linebreak-style
671
+ "linebreak-style": [
672
+ "error",
673
+ "unix"
674
+ ],
675
+ // require or disallow an empty line between class members
676
+ // https://eslint.org/docs/rules/lines-between-class-members
677
+ "lines-between-class-members": [
678
+ "error",
679
+ "always",
680
+ {
681
+ exceptAfterSingleLine: false
682
+ }
683
+ ],
684
+ // enforces empty lines around comments
685
+ "lines-around-comment": "off",
686
+ // require or disallow newlines around directives
687
+ // https://eslint.org/docs/rules/lines-around-directive
688
+ "lines-around-directive": [
689
+ "error",
690
+ {
691
+ before: "always",
692
+ after: "always"
693
+ }
694
+ ],
695
+ // Require or disallow logical assignment logical operator shorthand
696
+ // https://eslint.org/docs/latest/rules/logical-assignment-operators
697
+ // TODO, semver-major: enable
698
+ "logical-assignment-operators": [
699
+ "off",
700
+ "always",
701
+ {
702
+ enforceForIfStatements: true
703
+ }
704
+ ],
705
+ // specify the maximum depth that blocks can be nested
706
+ "max-depth": [
707
+ "off",
708
+ 4
709
+ ],
710
+ // specify the maximum length of a line in your program
711
+ // https://eslint.org/docs/rules/max-len
712
+ "max-len": [
713
+ "error",
714
+ 100,
715
+ 2,
716
+ {
717
+ ignoreUrls: true,
718
+ ignoreComments: true,
719
+ ignoreRegExpLiterals: true,
720
+ ignoreStrings: true,
721
+ ignoreTemplateLiterals: true
722
+ }
723
+ ],
724
+ // specify the max number of lines in a file
725
+ // https://eslint.org/docs/rules/max-lines
726
+ "max-lines": [
727
+ "off",
728
+ {
729
+ max: 300,
730
+ skipBlankLines: true,
731
+ skipComments: true
732
+ }
733
+ ],
734
+ // enforce a maximum function length
735
+ // https://eslint.org/docs/rules/max-lines-per-function
736
+ "max-lines-per-function": [
737
+ "off",
738
+ {
739
+ max: 50,
740
+ skipBlankLines: true,
741
+ skipComments: true,
742
+ IIFEs: true
743
+ }
744
+ ],
745
+ // specify the maximum depth callbacks can be nested
746
+ "max-nested-callbacks": "off",
747
+ // limits the number of parameters that can be used in the function declaration.
748
+ "max-params": [
749
+ "off",
750
+ 3
751
+ ],
752
+ // specify the maximum number of statement allowed in a function
753
+ "max-statements": [
754
+ "off",
755
+ 10
756
+ ],
757
+ // restrict the number of statements per line
758
+ // https://eslint.org/docs/rules/max-statements-per-line
759
+ "max-statements-per-line": [
760
+ "off",
761
+ {
762
+ max: 1
763
+ }
764
+ ],
765
+ // enforce a particular style for multiline comments
766
+ // https://eslint.org/docs/rules/multiline-comment-style
767
+ "multiline-comment-style": [
768
+ "off",
769
+ "starred-block"
770
+ ],
771
+ // require multiline ternary
772
+ // https://eslint.org/docs/rules/multiline-ternary
773
+ // TODO: enable?
774
+ "multiline-ternary": [
775
+ "off",
776
+ "never"
777
+ ],
778
+ // require a capital letter for constructors
779
+ "new-cap": [
780
+ "error",
781
+ {
782
+ newIsCap: true,
783
+ newIsCapExceptions: [],
784
+ capIsNew: false,
785
+ capIsNewExceptions: [
786
+ "Immutable.Map",
787
+ "Immutable.Set",
788
+ "Immutable.List"
789
+ ]
790
+ }
791
+ ],
792
+ "no-unused-vars": [
793
+ "error",
794
+ {
795
+ "args": "none"
796
+ }
797
+ ],
798
+ // disallow the omission of parentheses when invoking a constructor with no arguments
799
+ // https://eslint.org/docs/rules/new-parens
800
+ "new-parens": "error",
801
+ // allow/disallow an empty newline after var statement
802
+ "newline-after-var": [
803
+ "error",
804
+ "always"
805
+ ],
806
+ // https://eslint.org/docs/rules/newline-before-return
807
+ "newline-before-return": [
808
+ "error",
809
+ "always"
810
+ ],
811
+ // enforces new line after each method call in the chain to make it
812
+ // more readable and easy to maintain
813
+ // https://eslint.org/docs/rules/newline-per-chained-call
814
+ "newline-per-chained-call": [
815
+ "error",
816
+ {
817
+ ignoreChainWithDepth: 5
818
+ }
819
+ ],
820
+ // disallow use of the Array constructor
821
+ "no-array-constructor": "error",
822
+ // disallow use of bitwise operators
823
+ // https://eslint.org/docs/rules/no-bitwise
824
+ "no-bitwise": "off",
825
+ // disallow use of the continue statement
826
+ // https://eslint.org/docs/rules/no-continue
827
+ "no-continue": "off",
828
+ // disallow comments inline after code
829
+ "no-inline-comments": "off",
830
+ // disallow if as the only statement in an else block
831
+ // https://eslint.org/docs/rules/no-lonely-if
832
+ "no-lonely-if": "error",
833
+ // disallow un-paren'd mixes of different operators
834
+ // https://eslint.org/docs/rules/no-mixed-operators
835
+ "no-mixed-operators": [
836
+ "error",
837
+ {
838
+ // the list of arithmetic groups disallows mixing `%` and `**`
839
+ // with other arithmetic operators.
840
+ groups: [
841
+ [
842
+ "%",
843
+ "**"
844
+ ],
845
+ [
846
+ "%",
847
+ "+"
848
+ ],
849
+ [
850
+ "%",
851
+ "-"
852
+ ],
853
+ [
854
+ "%",
855
+ "*"
856
+ ],
857
+ [
858
+ "%",
859
+ "/"
860
+ ],
861
+ [
862
+ "/",
863
+ "*"
864
+ ],
865
+ [
866
+ "&",
867
+ "|",
868
+ "<<",
869
+ ">>",
870
+ ">>>"
871
+ ],
872
+ [
873
+ "==",
874
+ "!=",
875
+ "===",
876
+ "!=="
877
+ ],
878
+ [
879
+ "&&",
880
+ "||"
881
+ ]
882
+ ],
883
+ allowSamePrecedence: false
884
+ }
885
+ ],
886
+ // disallow mixed spaces and tabs for indentation
887
+ "no-mixed-spaces-and-tabs": "error",
888
+ // disallow use of chained assignment expressions
889
+ // https://eslint.org/docs/rules/no-multi-assign
890
+ "no-multi-assign": [
891
+ "error"
892
+ ],
893
+ // disallow multiple empty lines, only one newline at the end, and no new lines at the beginning
894
+ // https://eslint.org/docs/rules/no-multiple-empty-lines
895
+ "no-multiple-empty-lines": [
896
+ "error",
897
+ {
898
+ max: 1,
899
+ maxBOF: 0,
900
+ maxEOF: 0
901
+ }
902
+ ],
903
+ // disallow negated conditions
904
+ // https://eslint.org/docs/rules/no-negated-condition
905
+ "no-negated-condition": "off",
906
+ // disallow nested ternary expressions
907
+ "no-nested-ternary": "off",
908
+ // disallow use of the Object constructor
909
+ "no-new-object": "error",
910
+ // disallow use of unary operators, ++ and --
911
+ // https://eslint.org/docs/rules/no-plusplus
912
+ "no-plusplus": "off",
913
+ // disallow certain syntax forms
914
+ // https://eslint.org/docs/rules/no-restricted-syntax
915
+ "no-restricted-syntax": [
916
+ "error",
917
+ // {
918
+ // selector: "ForInStatement",
919
+ // message:
920
+ // "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array."
921
+ // },
922
+ // {
923
+ // selector: "ForOfStatement",
924
+ // message:
925
+ // "iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations."
926
+ // },
927
+ {
928
+ selector: "LabeledStatement",
929
+ message: "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand."
930
+ },
931
+ {
932
+ selector: "WithStatement",
933
+ message: "`with` is disallowed in strict mode because it makes code impossible to predict and optimize."
934
+ }
935
+ ],
936
+ // disallow space between function identifier and application
937
+ // deprecated in favor of func-call-spacing
938
+ "no-spaced-func": "off",
939
+ // disallow tab characters entirely
940
+ "no-tabs": "error",
941
+ // disallow the use of ternary operators
942
+ "no-ternary": "off",
943
+ // disallow trailing whitespace at the end of lines
944
+ "no-trailing-spaces": [
945
+ "error",
946
+ {
947
+ skipBlankLines: false,
948
+ ignoreComments: false
949
+ }
950
+ ],
951
+ // disallow dangling underscores in identifiers
952
+ // https://eslint.org/docs/rules/no-underscore-dangle
953
+ "no-underscore-dangle": [
954
+ "off",
955
+ {
956
+ allow: [],
957
+ allowAfterThis: false,
958
+ allowAfterSuper: false,
959
+ enforceInMethodNames: true
960
+ }
961
+ ],
962
+ // disallow the use of Boolean literals in conditional expressions
963
+ // also, prefer `a || b` over `a ? a : b`
964
+ // https://eslint.org/docs/rules/no-unneeded-ternary
965
+ "no-unneeded-ternary": [
966
+ "error",
967
+ {
968
+ defaultAssignment: false
969
+ }
970
+ ],
971
+ // disallow whitespace before properties
972
+ // https://eslint.org/docs/rules/no-whitespace-before-property
973
+ "no-whitespace-before-property": "error",
974
+ // enforce the location of single-line statements
975
+ // https://eslint.org/docs/rules/nonblock-statement-body-position
976
+ "nonblock-statement-body-position": [
977
+ "error",
978
+ "beside",
979
+ {
980
+ overrides: {}
981
+ }
982
+ ],
983
+ // require padding inside curly braces
984
+ "object-curly-spacing": [
985
+ "error",
986
+ "always"
987
+ ],
988
+ // enforce line breaks between braces
989
+ // https://eslint.org/docs/rules/object-curly-newline
990
+ "object-curly-newline": [
991
+ "error",
992
+ {
993
+ ObjectExpression: {
994
+ minProperties: 5,
995
+ multiline: true,
996
+ consistent: true
997
+ },
998
+ ObjectPattern: {
999
+ minProperties: 5,
1000
+ multiline: true,
1001
+ consistent: true
1002
+ },
1003
+ ImportDeclaration: {
1004
+ minProperties: 5,
1005
+ multiline: true,
1006
+ consistent: true
1007
+ },
1008
+ ExportDeclaration: {
1009
+ minProperties: 5,
1010
+ multiline: true,
1011
+ consistent: true
1012
+ }
1013
+ }
1014
+ ],
1015
+ // enforce "same line" or "multiple line" on object properties.
1016
+ // https://eslint.org/docs/rules/object-property-newline
1017
+ "object-property-newline": [
1018
+ "error",
1019
+ {
1020
+ allowAllPropertiesOnSameLine: true
1021
+ }
1022
+ ],
1023
+ // allow just one var statement per function
1024
+ "one-var": [
1025
+ "error",
1026
+ "never"
1027
+ ],
1028
+ // require a newline around variable declaration
1029
+ // https://eslint.org/docs/rules/one-var-declaration-per-line
1030
+ "one-var-declaration-per-line": [
1031
+ "error",
1032
+ "always"
1033
+ ],
1034
+ // require assignment operator shorthand where possible or prohibit it entirely
1035
+ // https://eslint.org/docs/rules/operator-assignment
1036
+ "operator-assignment": [
1037
+ "error",
1038
+ "always"
1039
+ ],
1040
+ // Requires operator at the beginning of the line in multiline statements
1041
+ // https://eslint.org/docs/rules/operator-linebreak
1042
+ "operator-linebreak": [
1043
+ "error",
1044
+ "after",
1045
+ {
1046
+ overrides: {
1047
+ "=": "none"
1048
+ }
1049
+ }
1050
+ ],
1051
+ // disallow padding within blocks
1052
+ "padded-blocks": [
1053
+ "error",
1054
+ {
1055
+ blocks: "never",
1056
+ classes: "never",
1057
+ switches: "never"
1058
+ },
1059
+ {
1060
+ allowSingleLineBlocks: true
1061
+ }
1062
+ ],
1063
+ // Require or disallow padding lines between statements
1064
+ // https://eslint.org/docs/rules/padding-line-between-statements
1065
+ "padding-line-between-statements": "off",
1066
+ // Disallow the use of Math.pow in favor of the ** operator
1067
+ // https://eslint.org/docs/rules/prefer-exponentiation-operator
1068
+ "prefer-exponentiation-operator": "error",
1069
+ // Prefer use of an object spread over Object.assign
1070
+ // https://eslint.org/docs/rules/prefer-object-spread
1071
+ "prefer-object-spread": "error",
1072
+ // require quotes around object literal property names
1073
+ // https://eslint.org/docs/rules/quote-props.html
1074
+ "quote-props": [
1075
+ "error",
1076
+ "as-needed",
1077
+ {
1078
+ keywords: false,
1079
+ unnecessary: true,
1080
+ numbers: false
1081
+ }
1082
+ ],
1083
+ // specify whether double or single quotes should be used
1084
+ quotes: [
1085
+ "error",
1086
+ "double",
1087
+ {
1088
+ avoidEscape: true
1089
+ }
1090
+ ],
1091
+ // do not require jsdoc
1092
+ // https://eslint.org/docs/rules/require-jsdoc
1093
+ "require-jsdoc": "off",
1094
+ // require or disallow use of semicolons instead of ASI
1095
+ semi: [
1096
+ "error",
1097
+ "always"
1098
+ ],
1099
+ // enforce spacing before and after semicolons
1100
+ "semi-spacing": [
1101
+ "error",
1102
+ {
1103
+ before: false,
1104
+ after: true
1105
+ }
1106
+ ],
1107
+ // Enforce location of semicolons
1108
+ // https://eslint.org/docs/rules/semi-style
1109
+ "semi-style": [
1110
+ "error",
1111
+ "last"
1112
+ ],
1113
+ // requires object keys to be sorted
1114
+ "sort-keys": [
1115
+ "off",
1116
+ "asc",
1117
+ {
1118
+ caseSensitive: false,
1119
+ natural: true
1120
+ }
1121
+ ],
1122
+ // sort variables within the same declaration block
1123
+ "sort-vars": "off",
1124
+ // require or disallow space before blocks
1125
+ "space-before-blocks": "error",
1126
+ // require or disallow space before function opening parenthesis
1127
+ // https://eslint.org/docs/rules/space-before-function-paren
1128
+ "space-before-function-paren": "off",
1129
+ // "error",
1130
+ // {
1131
+ // anonymous: "always",
1132
+ // named: "never",
1133
+ // asyncArrow: "always"
1134
+ // }
1135
+ // ],
1136
+ // require or disallow spaces inside parentheses
1137
+ "space-in-parens": [
1138
+ "error",
1139
+ "never"
1140
+ ],
1141
+ // require spaces around operators
1142
+ "space-infix-ops": "error",
1143
+ // Require or disallow spaces before/after unary operators
1144
+ // https://eslint.org/docs/rules/space-unary-ops
1145
+ "space-unary-ops": [
1146
+ "error",
1147
+ {
1148
+ words: true,
1149
+ nonwords: false,
1150
+ overrides: {}
1151
+ }
1152
+ ],
1153
+ // require or disallow a space immediately following the // or /* in a comment
1154
+ // https://eslint.org/docs/rules/spaced-comment
1155
+ "spaced-comment": [
1156
+ "error",
1157
+ "always",
1158
+ {
1159
+ line: {
1160
+ exceptions: [
1161
+ "-",
1162
+ "+"
1163
+ ],
1164
+ markers: [
1165
+ "=",
1166
+ "!",
1167
+ "/"
1168
+ ]
1169
+ // space here to support sprockets directives, slash for TS /// comments
1170
+ },
1171
+ block: {
1172
+ exceptions: [
1173
+ "-",
1174
+ "+"
1175
+ ],
1176
+ markers: [
1177
+ "=",
1178
+ "!",
1179
+ ":",
1180
+ "::"
1181
+ ],
1182
+ balanced: true
1183
+ }
1184
+ }
1185
+ ],
1186
+ // Enforce spacing around colons of switch statements
1187
+ // https://eslint.org/docs/rules/switch-colon-spacing
1188
+ "switch-colon-spacing": [
1189
+ "error",
1190
+ {
1191
+ after: true,
1192
+ before: false
1193
+ }
1194
+ ],
1195
+ // Require or disallow spacing between template tags and their literals
1196
+ // https://eslint.org/docs/rules/template-tag-spacing
1197
+ "template-tag-spacing": [
1198
+ "error",
1199
+ "never"
1200
+ ],
1201
+ // require or disallow the Unicode Byte Order Mark
1202
+ // https://eslint.org/docs/rules/unicode-bom
1203
+ "unicode-bom": [
1204
+ "error",
1205
+ "never"
1206
+ ],
1207
+ // require regex literals to be wrapped in parentheses
1208
+ "wrap-regex": "off",
1209
+ "class-methods-use-this": "off"
1210
+ };
1211
+ if (options.typescriptEslintConfigType !== "none") {
1212
+ rules = {
1213
+ ...rules,
1214
+ /*************************************************************
1215
+ *
1216
+ * TypeScript Rules - The following rules are specific to the TypeScript plugin
1217
+ *
1218
+ **************************************************************/
1219
+ "@typescript-eslint/no-explicit-any": "off",
1220
+ "@typescript-eslint/no-empty-function": "off",
1221
+ "@typescript-eslint/no-var-requires": "off",
1222
+ "@typescript-eslint/ban-ts-comment": "off",
1223
+ "@typescript-eslint/no-empty-interface": "off",
1224
+ "@typescript-eslint/explicit-module-boundary-types": "off",
1225
+ "@typescript-eslint/explicit-function-return-type": "off",
1226
+ "@typescript-eslint/no-unused-vars": [
1227
+ "error",
1228
+ {
1229
+ "args": "none",
1230
+ varsIgnorePattern: "^_"
1231
+ }
1232
+ ],
1233
+ "@typescript-eslint/prefer-nullish-coalescing": [
1234
+ "error",
1235
+ {
1236
+ ignorePrimitives: {
1237
+ string: true
1238
+ }
1239
+ }
1240
+ ],
1241
+ "@typescript-eslint/no-restricted-imports": [
1242
+ "error",
1243
+ {
1244
+ "patterns": [
1245
+ {
1246
+ "group": [
1247
+ "nx/src/plugins/js*"
1248
+ ],
1249
+ "message": "Imports from 'nx/src/plugins/js' are not allowed. Use '@nx/js' instead"
1250
+ },
1251
+ {
1252
+ "group": [
1253
+ "**/native-bindings",
1254
+ "**/native-bindings.js"
1255
+ ],
1256
+ "message": "Direct imports from native-bindings.js are not allowed. Import from index.js instead."
1257
+ },
1258
+ {
1259
+ "group": [
1260
+ "create-storm-workspace"
1261
+ ],
1262
+ "message": "Direct imports from `create-storm-workspace` are not allowed. Instead install this package globally (example: 'npm i create-storm-workspace -g')."
1263
+ },
1264
+ {
1265
+ "group": [
1266
+ "create-nx-workspace"
1267
+ ],
1268
+ "message": "Direct imports from `create-nx-workspace` are not allowed. Instead install this package globally (example: 'npm i create-nx-workspace -g')."
1269
+ }
1270
+ ]
1271
+ }
1272
+ ]
1273
+ };
1274
+ }
1275
+ if (options.useNx !== false) {
1276
+ rules = {
1277
+ ...rules,
1278
+ /*************************************************************
1279
+ *
1280
+ * Nx Rules - The following rules are specific to the Nx plugin
1281
+ *
1282
+ **************************************************************/
1283
+ "@nx/enforce-module-boundaries": [
1284
+ "error",
1285
+ {
1286
+ enforceBuildableLibDependency: true,
1287
+ checkDynamicDependenciesExceptions: [
1288
+ ".*"
1289
+ ],
1290
+ allow: [],
1291
+ depConstraints: [
1292
+ {
1293
+ sourceTag: "*",
1294
+ onlyDependOnLibsWithTags: [
1295
+ "*"
1296
+ ]
1297
+ }
1298
+ ]
1299
+ }
1300
+ ]
1301
+ };
1302
+ }
1303
+ if (options.useUnicorn !== false) {
1304
+ rules = {
1305
+ ...rules,
1306
+ /*************************************************************
1307
+ *
1308
+ * Unicorn Rules - The following rules are specific to the Unicorn plugin
1309
+ *
1310
+ **************************************************************/
1311
+ "unicorn/number-literal-case": "off",
1312
+ "unicorn/template-indent": "off",
1313
+ "unicorn/prevent-abbreviations": "off",
1314
+ "unicorn/no-await-expression-member": "off",
1315
+ "unicorn/no-useless-undefined": "off",
1316
+ "unicorn/no-array-push-push": "off",
1317
+ "unicorn/no-array-reduce": "off",
1318
+ "unicorn/no-useless-switch-case": "off",
1319
+ "unicorn/prefer-string-replace-all": "off",
1320
+ "unicorn/no-abusive-eslint-disable": "off",
1321
+ "unicorn/import-style": "off",
1322
+ "unicorn/prefer-module": "off",
1323
+ "unicorn/consistent-function-scoping": "off",
1324
+ "unicorn/no-nested-ternary": "off"
1325
+ };
1326
+ }
1327
+ return rules;
1328
+ }, "getStormRulesConfig");
1329
+
1330
+ export {
1331
+ getStormRulesConfig
1332
+ };