@storm-software/linting-tools 1.44.8 → 1.44.9

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 (43) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE +201 -0
  3. package/README.md +1 -1
  4. package/bin/lint.js +334927 -0
  5. package/package.json +1 -1
  6. package/src/cli/index.js +328523 -0
  7. package/src/eslint/graphql/{index.ts → index.js} +7 -4
  8. package/src/eslint/{rules/storm.ts → javascript/index.js} +136 -3
  9. package/src/eslint/jest/index.js +19 -0
  10. package/src/eslint/json/index.js +90 -0
  11. package/src/eslint/next/index.js +90 -0
  12. package/src/eslint/{rules/react.ts → react/index.js} +39 -3
  13. package/src/eslint/typescript/index.js +558 -0
  14. package/src/manypkg/index.js +34729 -0
  15. package/.eslintrc.json +0 -97
  16. package/jest.config.ts +0 -11
  17. package/project.json +0 -120
  18. package/src/alex/index.ts +0 -67
  19. package/src/cli/index.ts +0 -300
  20. package/src/eslint/constants.ts +0 -87
  21. package/src/eslint/index.ts +0 -7
  22. package/src/eslint/javascript/index.ts +0 -22
  23. package/src/eslint/jest/index.ts +0 -16
  24. package/src/eslint/json/index.ts +0 -32
  25. package/src/eslint/next/index.ts +0 -25
  26. package/src/eslint/react/index.ts +0 -25
  27. package/src/eslint/rules/import.ts +0 -85
  28. package/src/eslint/rules/jsx-a11y.ts +0 -8
  29. package/src/eslint/rules/ts-docs.ts +0 -12
  30. package/src/eslint/rules/unicorn.ts +0 -23
  31. package/src/eslint/typescript/index.ts +0 -132
  32. package/src/manypkg/index.ts +0 -164
  33. package/tsconfig.json +0 -23
  34. package/tsconfig.spec.json +0 -13
  35. /package/{src/alex → alex}/.alexignore +0 -0
  36. /package/{src/alex → alex}/.alexrc +0 -0
  37. /package/{src/biome → biome}/biome.json +0 -0
  38. /package/{src/cspell → cspell}/config.json +0 -0
  39. /package/{src/cspell → cspell}/dictionary.txt +0 -0
  40. /package/{src/ls-lint → ls-lint}/.ls-lint.yml +0 -0
  41. /package/{src/prettier → prettier}/.prettierignore +0 -0
  42. /package/{src/prettier → prettier}/config.json +0 -0
  43. /package/{src/taplo → taplo}/.taplo.toml +0 -0
@@ -0,0 +1,558 @@
1
+ const require = (await import('node:module')).createRequire(import.meta.url);const __filename = (await import('node:url')).fileURLToPath(import.meta.url);const __dirname = (await import('node:path')).dirname(__filename);
2
+
3
+ // packages/linting-tools/src/eslint/constants.ts
4
+ var RESTRICTED_SYNTAX = [
5
+ {
6
+ // ❌ readFile(…, { encoding: … })
7
+ selector: "CallExpression[callee.name=/readFileSync|readFile|writeFileSync|writeFile/] > .arguments:last-child[type=ObjectExpression][properties.length=1] Property[key.name=encoding]",
8
+ message: "Specify encoding as last argument instead of object with encoding key"
9
+ },
10
+ {
11
+ // ❌ readFile(…, {})
12
+ selector: "CallExpression[callee.name=/readFileSync|readFile|writeFileSync|writeFile/] > .arguments:last-child[type=ObjectExpression][properties.length=0]",
13
+ message: "Specify encoding as last argument"
14
+ },
15
+ {
16
+ // ❌ readFileSync(…).toString(…)
17
+ selector: "CallExpression[callee.name=readFileSync][parent.property.name=toString]",
18
+ message: "toString is redundant, specify encoding as last argument"
19
+ },
20
+ {
21
+ // ❌ ….readFile(…, { encoding: … })
22
+ selector: "CallExpression[callee.type=MemberExpression][callee.property.name=/readFileSync|readFile|writeFileSync|writeFile/] > .arguments:last-child[type=ObjectExpression][properties.length=1] Property[key.name=encoding]",
23
+ message: "Specify encoding as last argument instead of object with encoding key"
24
+ },
25
+ {
26
+ // ❌ ….readFile(…, {})
27
+ selector: "CallExpression[callee.type=MemberExpression][callee.property.name=/readFileSync|readFile|writeFileSync|writeFile/] > .arguments:last-child[type=ObjectExpression][properties.length=0]",
28
+ message: "Specify encoding as last argument"
29
+ },
30
+ {
31
+ // ❌ Boolean(…)
32
+ selector: "CallExpression[callee.name=Boolean][arguments.1.elements.length!=0]",
33
+ message: "Prefer `!!\u2026` over `Boolean(\u2026)` because TypeScript infers a narrow literal boolean `type: true` instead of `type: boolean`."
34
+ },
35
+ {
36
+ // ❌ process.browser
37
+ selector: "ExpressionStatement[expression.object.name=process][expression.property.name=browser]",
38
+ message: "`process.browser` is deprecated, use `!!globalThis.window`"
39
+ }
40
+ // {
41
+ // // ❌ let { foo: { bar } } = baz
42
+ // // ✅ let { bar } = baz.foo
43
+ // // ✅ let { foo: { bar } } = await baz
44
+ // selector:
45
+ // 'VariableDeclarator[init.type!=AwaitExpression] > ObjectPattern[properties.length=1][properties.0.value.type=ObjectPattern]',
46
+ // message: 'Do not use nested destructuring.',
47
+ // },
48
+ ];
49
+ var REACT_RESTRICTED_SYNTAX = [
50
+ ...RESTRICTED_SYNTAX,
51
+ {
52
+ // ❌ useMemo(…, [])
53
+ selector: "CallExpression[callee.name=useMemo][arguments.1.type=ArrayExpression][arguments.1.elements.length=0]",
54
+ message: "`useMemo` with an empty dependency array can't provide a stable reference, use `useRef` instead."
55
+ }
56
+ ];
57
+ var RESTRICTED_GLOBALS = ["stop", { name: "isNaN", message: "Use Number.isNaN instead" }];
58
+ var RESTRICTED_MODULES = [
59
+ { name: "axios", message: "Use `fetch/node-fetch` instead." },
60
+ { name: "moment", message: "Use `dayjs/date-fns` instead." },
61
+ { name: "classnames", message: "Use `clsx` instead because it is faster." },
62
+ {
63
+ name: "lodash/isString.js",
64
+ message: "Use `typeof yourVar === 'string'` instead."
65
+ },
66
+ { name: "lodash/isArray.js", message: "Use `Array.isArray` instead." },
67
+ { name: "lodash/flatten.js", message: "Use `Array#flat()` instead." },
68
+ {
69
+ name: "lodash/compact.js",
70
+ message: "Use `Array#filter(Boolean)` instead."
71
+ },
72
+ { name: "lodash/identity.js", message: "Use `(value) => value` instead." }
73
+ ];
74
+
75
+ // packages/linting-tools/src/eslint/rules/import.ts
76
+ var config = {
77
+ /**
78
+ * Disallow non-import statements appearing before import statements.
79
+ *
80
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/first.md
81
+ */
82
+ "import/first": "error",
83
+ /**
84
+ * Require a newline after the last import/require.
85
+ *
86
+ * 🔧 Fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/newline-after-import.md
87
+ */
88
+ "import/newline-after-import": "warn",
89
+ /**
90
+ * Disallow import of modules using absolute paths.
91
+ *
92
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-absolute-path.md
93
+ */
94
+ "import/no-absolute-path": "error",
95
+ /**
96
+ * Disallow cyclical dependencies between modules.
97
+ *
98
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-cycle.md
99
+ */
100
+ "import/no-cycle": "error",
101
+ /**
102
+ * Disallow default exports.
103
+ *
104
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-default-export.md
105
+ */
106
+ "import/no-default-export": "error",
107
+ /**
108
+ * Disallow the use of extraneous packages.
109
+ *
110
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-extraneous-dependencies.md
111
+ */
112
+ "import/no-extraneous-dependencies": ["error", { includeInternal: true, includeTypes: true }],
113
+ /**
114
+ * Disallow mutable exports.
115
+ *
116
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-mutable-exports.md
117
+ */
118
+ "import/no-mutable-exports": "error",
119
+ /**
120
+ * Disallow importing packages through relative paths.
121
+ *
122
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-relative-packages.md
123
+ */
124
+ "import/no-relative-packages": "warn",
125
+ /**
126
+ * Disallow a module from importing itself.
127
+ *
128
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-self-import.md
129
+ */
130
+ "import/no-self-import": "error",
131
+ /**
132
+ * Ensures that there are no useless path segments.
133
+ *
134
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-useless-path-segments.md
135
+ */
136
+ "import/no-useless-path-segments": ["error"],
137
+ /**
138
+ * Enforce a module import order convention.
139
+ *
140
+ * 🔧 Fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md
141
+ */
142
+ "import/order": [
143
+ "warn",
144
+ {
145
+ groups: [
146
+ "builtin",
147
+ // Node.js built-in modules
148
+ "external",
149
+ // Packages
150
+ "internal",
151
+ // Aliased modules
152
+ "parent",
153
+ // Relative parent
154
+ "sibling",
155
+ // Relative sibling
156
+ "index"
157
+ // Relative index
158
+ ],
159
+ "newlines-between": "never"
160
+ }
161
+ ]
162
+ };
163
+ var import_default = config;
164
+
165
+ // packages/linting-tools/src/eslint/rules/storm.ts
166
+ var config2 = {
167
+ /**
168
+ * Require return statements in array methods callbacks.
169
+ *
170
+ * 🚫 Not fixable -https://eslint.org/docs/rules/array-callback-return
171
+ */
172
+ "array-callback-return": ["error", { allowImplicit: true }],
173
+ /**
174
+ * Treat `var` statements as if they were block scoped.
175
+ *
176
+ * 🚫 Not fixable - https://eslint.org/docs/rules/block-scoped-var
177
+ */
178
+ "block-scoped-var": "error",
179
+ /**
180
+ * Require curly braces for multiline blocks.
181
+ *
182
+ * 🔧 Fixable - https://eslint.org/docs/rules/curly
183
+ */
184
+ curly: ["warn", "multi-line"],
185
+ /**
186
+ * Require default clauses in switch statements to be last (if used).
187
+ *
188
+ * 🚫 Not fixable - https://eslint.org/docs/rules/default-case-last
189
+ */
190
+ "default-case-last": "error",
191
+ /**
192
+ * Require triple equals (`===` and `!==`).
193
+ *
194
+ * 🔧 Fixable - https://eslint.org/docs/rules/eqeqeq
195
+ */
196
+ eqeqeq: "error",
197
+ /**
198
+ * Require grouped accessor pairs in object literals and classes.
199
+ *
200
+ * 🚫 Not fixable - https://eslint.org/docs/rules/grouped-accessor-pairs
201
+ */
202
+ "grouped-accessor-pairs": "error",
203
+ /**
204
+ * Disallow use of `alert()`.
205
+ *
206
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-alert
207
+ */
208
+ "no-alert": "error",
209
+ /**
210
+ * Disallow use of `caller`/`callee`.
211
+ *
212
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-caller
213
+ */
214
+ "no-caller": "error",
215
+ /**
216
+ * Disallow returning value in constructor.
217
+ *
218
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-constructor-return
219
+ */
220
+ "no-constructor-return": "error",
221
+ /**
222
+ * Disallow using an `else` if the `if` block contains a return.
223
+ *
224
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-else-return
225
+ */
226
+ "no-else-return": "warn",
227
+ /**
228
+ * Disallow `eval()`.
229
+ *
230
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-eval
231
+ */
232
+ "no-eval": "error",
233
+ /**
234
+ * Disallow extending native objects.
235
+ *
236
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-extend-native
237
+ */
238
+ "no-extend-native": "error",
239
+ /**
240
+ * Disallow unnecessary function binding.
241
+ *
242
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-bind
243
+ */
244
+ "no-extra-bind": "error",
245
+ /**
246
+ * Disallow unnecessary labels.
247
+ *
248
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-label
249
+ */
250
+ "no-extra-label": "error",
251
+ /**
252
+ * Disallow floating decimals.
253
+ *
254
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-floating-decimal
255
+ */
256
+ "no-floating-decimal": "error",
257
+ /**
258
+ * Make people convert types explicitly e.g. `Boolean(foo)` instead of `!!foo`.
259
+ *
260
+ * 🔧 Partially Fixable - https://eslint.org/docs/rules/no-implicit-coercion
261
+ */
262
+ "no-implicit-coercion": "error",
263
+ /**
264
+ * Disallow use of `eval()`-like methods.
265
+ *
266
+ * https://eslint.org/docs/rules/no-implied-eval
267
+ */
268
+ "no-implied-eval": "error",
269
+ /**
270
+ * Disallow usage of `__iterator__` property.
271
+ *
272
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-iterator
273
+ */
274
+ "no-iterator": "error",
275
+ /**
276
+ * Disallow use of labels for anything other than loops and switches.
277
+ *
278
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-labels
279
+ */
280
+ "no-labels": ["error"],
281
+ /**
282
+ * Disallow unnecessary nested blocks.
283
+ *
284
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-lone-blocks
285
+ */
286
+ "no-lone-blocks": "error",
287
+ /**
288
+ * Disallow `new` for side effects.
289
+ *
290
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-new
291
+ */
292
+ "no-new": "error",
293
+ /**
294
+ * Disallow function constructors.
295
+ *
296
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-func
297
+ */
298
+ "no-new-func": "error",
299
+ /**
300
+ * Disallow base types wrapper instances, such as `new String('foo')`.
301
+ *
302
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-wrappers
303
+ */
304
+ "no-new-wrappers": "error",
305
+ /**
306
+ * Disallow use of octal escape sequences in string literals.
307
+ *
308
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-octal-escape
309
+ */
310
+ "no-octal-escape": "error",
311
+ /**
312
+ * Disallow reassignment of function parameters.
313
+ *
314
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-param-reassign
315
+ */
316
+ "no-param-reassign": "error",
317
+ /**
318
+ * Disallow usage of the deprecated `__proto__` property.
319
+ *
320
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-proto
321
+ */
322
+ "no-proto": "error",
323
+ /**
324
+ * Disallow assignment in `return` statement.
325
+ *
326
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-return-assign
327
+ */
328
+ "no-return-assign": "error",
329
+ /**
330
+ * Disallows unnecessary `return await`.
331
+ *
332
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-return-await
333
+ */
334
+ "no-return-await": "error",
335
+ /**
336
+ * Disallow use of `javascript:` urls.
337
+ *
338
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-script-url
339
+ */
340
+ "no-script-url": "error",
341
+ /**
342
+ * Disallow comparisons where both sides are exactly the same.
343
+ *
344
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-self-compare
345
+ */
346
+ "no-self-compare": "error",
347
+ /**
348
+ * Disallow use of comma operator.
349
+ *
350
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-sequences
351
+ */
352
+ "no-sequences": "error",
353
+ /**
354
+ * Disallow unnecessary `.call()` and `.apply()`.
355
+ *
356
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-useless-call
357
+ */
358
+ "no-useless-call": "error",
359
+ /**
360
+ * Disallow unnecessary concatenation of strings.
361
+ *
362
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-useless-concat
363
+ */
364
+ "no-useless-concat": "error",
365
+ /**
366
+ * Disallow redundant return statements.
367
+ *
368
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-useless-return
369
+ */
370
+ "no-useless-return": "warn",
371
+ /**
372
+ * Require using named capture groups in regular expressions.
373
+ *
374
+ * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-named-capture-group
375
+ */
376
+ "prefer-named-capture-group": "error",
377
+ /**
378
+ * Require using Error objects as Promise rejection reasons.
379
+ *
380
+ * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-promise-reject-errors
381
+ */
382
+ "prefer-promise-reject-errors": ["error", { allowEmptyReject: true }],
383
+ /**
384
+ * Disallow use of the RegExp constructor in favor of regular expression
385
+ * literals.
386
+ *
387
+ * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-regex-literals
388
+ */
389
+ "prefer-regex-literals": "error",
390
+ /**
391
+ * Disallow "Yoda conditions", ensuring the comparison.
392
+ *
393
+ * 🔧 Fixable - https://eslint.org/docs/rules/yoda
394
+ */
395
+ yoda: "warn"
396
+ };
397
+ var storm_default = config2;
398
+
399
+ // packages/linting-tools/src/eslint/rules/ts-docs.ts
400
+ var config3 = {
401
+ /**
402
+ * Require TSDoc comments conform to the TSDoc specification.
403
+ *
404
+ * 🚫 Not fixable - https://github.com/microsoft/tsdoc/tree/master/eslint-plugin
405
+ */
406
+ "tsdoc/syntax": "error"
407
+ };
408
+ var ts_docs_default = config3;
409
+
410
+ // packages/linting-tools/src/eslint/rules/unicorn.ts
411
+ var config4 = {
412
+ /**
413
+ * Require consistent filename case for all linted files.
414
+ *
415
+ * 🚫 Not fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/filename-case.md
416
+ */
417
+ "unicorn/filename-case": [
418
+ "error",
419
+ {
420
+ case: "kebabCase"
421
+ }
422
+ ],
423
+ /**
424
+ * Require using the `node:` protocol when importing Node.js built-in modules.
425
+ *
426
+ * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-node-protocol.md
427
+ */
428
+ "unicorn/prefer-node-protocol": "warn"
429
+ };
430
+ var unicorn_default = config4;
431
+
432
+ // packages/linting-tools/src/eslint/typescript/index.ts
433
+ var config5 = {
434
+ root: true,
435
+ overrides: [
436
+ {
437
+ files: ["*.ts", "*.tsx"],
438
+ extends: ["plugin:@nx/typescript"],
439
+ rules: {}
440
+ }
441
+ ],
442
+ parser: "@typescript-eslint/parser",
443
+ extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
444
+ plugins: ["sonarjs", "unicorn", "promise", "import", "eslint-plugin-tsdoc"],
445
+ rules: {
446
+ // Disallows if statements as the only statement in else blocks
447
+ // https://eslint.org/docs/rules/no-lonely-if
448
+ "no-lonely-if": "error",
449
+ // Disallows the use of console
450
+ // https://eslint.org/docs/rules/no-console
451
+ "no-console": "error",
452
+ // Requires method and property shorthand syntax for object literals
453
+ // https://eslint.org/docs/rules/object-shorthand
454
+ "object-shorthand": ["error", "always"],
455
+ // Disallows loops with a body that allows only one iteration
456
+ // https://eslint.org/docs/rules/no-unreachable-loop
457
+ "no-unreachable-loop": "error",
458
+ "sonarjs/no-one-iteration-loop": "off",
459
+ // similar to 'no-unreachable-loop' but reports less cases
460
+ "prefer-arrow-callback": ["error", { allowNamedFunctions: true }],
461
+ "sonarjs/no-unused-collection": "error",
462
+ "sonarjs/no-identical-conditions": "error",
463
+ "sonarjs/no-inverted-boolean-check": "error",
464
+ "sonarjs/no-use-of-empty-return-value": "error",
465
+ "sonarjs/no-gratuitous-expressions": "error",
466
+ "sonarjs/no-nested-switch": "error",
467
+ "unicorn/no-lonely-if": "error",
468
+ "sonarjs/no-collapsible-if": "off",
469
+ // same as 'unicorn/no-lonely-if'
470
+ "unicorn/no-array-push-push": "error",
471
+ "unicorn/no-instanceof-array": "error",
472
+ "unicorn/no-empty-file": "error",
473
+ "unicorn/no-useless-fallback-in-spread": "error",
474
+ "unicorn/prefer-array-find": "error",
475
+ "unicorn/no-useless-spread": "error",
476
+ "unicorn/prefer-includes": "error",
477
+ // Disallows specified syntax
478
+ // https://eslint.org/docs/rules/no-restricted-syntax
479
+ "no-restricted-syntax": ["error", ...RESTRICTED_SYNTAX],
480
+ "no-else-return": ["error", { allowElseIf: false }],
481
+ "promise/no-nesting": "error",
482
+ "import/extensions": ["error", "ignorePackages"],
483
+ // Bob when bundling requires to have `.js` extension
484
+ "import/no-default-export": "error",
485
+ "import/prefer-default-export": "off",
486
+ // disable opposite of 'import/no-default-export'
487
+ "unicorn/filename-case": "error",
488
+ "@typescript-eslint/no-unused-vars": [
489
+ "error",
490
+ {
491
+ argsIgnorePattern: "^_",
492
+ varsIgnorePattern: "^_"
493
+ // allow underscores in destructuring
494
+ }
495
+ ],
496
+ // Enforce the style of numeric separators by correctly grouping digits
497
+ // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/numeric-separators-style.md
498
+ "unicorn/numeric-separators-style": "error",
499
+ // Prefer using the node: protocol when importing Node.js builtin modules
500
+ // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-node-protocol.md
501
+ "unicorn/prefer-node-protocol": "error",
502
+ // Reports any imports that come after non-import statements
503
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/first.md
504
+ "import/first": "error",
505
+ // Disallow shorthand type conversions
506
+ // https://eslint.org/docs/latest/rules/no-implicit-coercion
507
+ "no-implicit-coercion": [
508
+ "error",
509
+ {
510
+ disallowTemplateShorthand: true,
511
+ // in TypeScript `!!` is preferable https://www.typescriptlang.org/docs/handbook/2/narrowing.html#truthiness-narrowing
512
+ boolean: false
513
+ }
514
+ ],
515
+ // Disallow specified modules when loaded by `import` declarations
516
+ // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-restricted-import.md
517
+ "n/no-restricted-import": ["error", RESTRICTED_MODULES],
518
+ // Disallow specified modules when loaded by require
519
+ // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-restricted-require.md
520
+ "n/no-restricted-require": ["error", RESTRICTED_MODULES],
521
+ "no-restricted-modules": "off",
522
+ // deprecated in favor of corresponding rules from `eslint-plugin-n`
523
+ // Disallow specified global variables
524
+ // https://eslint.org/docs/latest/rules/no-restricted-globals
525
+ "no-restricted-globals": ["error", ...RESTRICTED_GLOBALS],
526
+ "@typescript-eslint/no-explicit-any": "error",
527
+ "prefer-const": ["error", { destructuring: "all" }],
528
+ "import/no-duplicates": "error",
529
+ "import/newline-after-import": "off",
530
+ // prettified by prettier-plugin-sort-imports
531
+ "prefer-object-has-own": "error",
532
+ "logical-assignment-operators": ["error", "always", { enforceForIfStatements: true }],
533
+ "@typescript-eslint/prefer-optional-chain": "error",
534
+ yoda: "error",
535
+ "unicorn/prefer-export-from": ["error", { ignoreUsedVariables: true }],
536
+ "promise/no-multiple-resolved": "error",
537
+ "unicorn/prefer-logical-operator-over-ternary": "error",
538
+ "no-unused-expressions": "off",
539
+ "@typescript-eslint/no-unused-expressions": "error",
540
+ "no-negated-condition": "off",
541
+ "unicorn/no-negated-condition": "error",
542
+ "unicorn/no-array-for-each": "error",
543
+ "unicorn/prefer-string-trim-start-end": "error",
544
+ "no-self-compare": "error",
545
+ eqeqeq: ["error", "always", { null: "ignore" }],
546
+ "import/no-useless-path-segments": "error",
547
+ "require-await": "off",
548
+ "no-return-await": "off",
549
+ ...import_default,
550
+ ...unicorn_default,
551
+ ...ts_docs_default,
552
+ ...storm_default
553
+ }
554
+ };
555
+ var typescript_default = config5;
556
+ export {
557
+ typescript_default as default
558
+ };