@@ -55,7 +55,7 @@ export default tsConfig(
55
55
'internal-rules/require-to-string-tag' : 'off' ,
56
56
57
57
//////////////////////////////////////////////////////////////////////////////
58
- // `eslint-plugin-n` rule list based on `v17.14 .x`
58
+ // `eslint-plugin-n` rule list based on `v17.21 .x`
59
59
//////////////////////////////////////////////////////////////////////////////
60
60
61
61
// Rules
@@ -82,6 +82,7 @@ export default tsConfig(
82
82
'n/no-restricted-import' : 'off' ,
83
83
'n/no-restricted-require' : 'off' ,
84
84
'n/no-sync' : 'off' , // TODO: consider enabling, currently triggers with executeSync/graphqlSync, without ability to add exceptions
85
+ 'n/no-top-level-await' : 'error' ,
85
86
'n/no-unpublished-bin' : 'error' ,
86
87
'n/no-unpublished-import' : 'error' ,
87
88
'n/no-unpublished-require' : 'error' ,
@@ -105,12 +106,13 @@ export default tsConfig(
105
106
'n/shebang' : 'error' ,
106
107
107
108
//////////////////////////////////////////////////////////////////////////////
108
- // `eslint-plugin-import` rule list based on `v2.31 .x`
109
+ // `eslint-plugin-import` rule list based on `v2.32 .x`
109
110
//////////////////////////////////////////////////////////////////////////////
110
111
111
112
// Static analysis
112
113
// https://github.com/benmosher/eslint-plugin-import#static-analysis
113
114
'import/default' : 'error' ,
115
+ 'import/enforce-node-protocol-usage' : [ 'error' , 'always' ] ,
114
116
'import/named' : 'error' ,
115
117
'import/namespace' : 'error' ,
116
118
'import/no-absolute-path' : 'error' ,
@@ -228,7 +230,7 @@ export default tsConfig(
228
230
'simple-import-sort/exports' : 'off' , // TODO: error
229
231
230
232
//////////////////////////////////////////////////////////////////////////////
231
- // ESLint builtin rules list based on `v9.16 .x`
233
+ // ESLint builtin rules list based on `v9.31 .x`
232
234
//////////////////////////////////////////////////////////////////////////////
233
235
234
236
// Possible Errors
@@ -275,6 +277,7 @@ export default tsConfig(
275
277
'no-sparse-arrays' : 'error' ,
276
278
'no-template-curly-in-string' : 'error' ,
277
279
'no-this-before-super' : 'error' ,
280
+ 'no-unassigned-vars' : 'error' ,
278
281
'no-undef' : 'error' ,
279
282
'no-unexpected-multiline' : 'error' ,
280
283
'no-unmodified-loop-condition' : 'error' ,
@@ -492,7 +495,7 @@ export default tsConfig(
492
495
} ,
493
496
rules : {
494
497
//////////////////////////////////////////////////////////////////////////
495
- // `@typescript-eslint/eslint-plugin` rule list based on `v8.16 .x`
498
+ // `@typescript-eslint/eslint-plugin` rule list based on `v8.37 .x`
496
499
//////////////////////////////////////////////////////////////////////////
497
500
498
501
// Supported Rules
@@ -513,7 +516,7 @@ export default tsConfig(
513
516
] ,
514
517
'@typescript-eslint/ban-tslint-comment' : 'error' ,
515
518
'@typescript-eslint/class-literal-property-style' : 'off' , // TODO: enable after TS conversion
516
- '@typescript-eslint/class-methods-use-this' : 'off' ,
519
+ '@typescript-eslint/class-methods-use-this' : 'off' , // now in core
517
520
'@typescript-eslint/consistent-generic-constructors' : 'error' ,
518
521
'@typescript-eslint/consistent-indexed-object-style' : [
519
522
'error' ,
@@ -524,32 +527,27 @@ export default tsConfig(
524
527
'@typescript-eslint/consistent-type-definitions' : 'error' ,
525
528
'@typescript-eslint/consistent-type-exports' : 'error' ,
526
529
'@typescript-eslint/consistent-type-imports' : 'error' ,
527
- '@typescript-eslint/default-param-last' : 'error' ,
530
+ '@typescript-eslint/default-param-last' : 'off' , // now in core
528
531
'@typescript-eslint/dot-notation' : 'error' ,
529
532
'@typescript-eslint/explicit-function-return-type' : 'off' , // TODO: consider
530
533
'@typescript-eslint/explicit-member-accessibility' : 'off' , // TODO: consider
531
534
'@typescript-eslint/explicit-module-boundary-types' : 'off' , // TODO: consider
532
- '@typescript-eslint/init-declarations' : 'off' ,
533
- '@typescript-eslint/max-params' : [
534
- 'error' ,
535
- {
536
- max : 5 , // TODO: drop to default number, which is 3
537
- } ,
538
- ] ,
535
+ '@typescript-eslint/init-declarations' : 'off' , // now in core
536
+ '@typescript-eslint/max-params' : 'off' , // now in core
539
537
'@typescript-eslint/member-ordering' : 'error' ,
540
538
'@typescript-eslint/method-signature-style' : 'error' ,
541
539
'@typescript-eslint/naming-convention' : 'off' ,
542
- '@typescript-eslint/no-array-constructor' : 'error' ,
540
+ '@typescript-eslint/no-array-constructor' : 'off' , // now in core
543
541
'@typescript-eslint/no-array-delete' : 'error' ,
544
542
'@typescript-eslint/no-base-to-string' : 'error' ,
545
543
'@typescript-eslint/no-confusing-non-null-assertion' : 'error' ,
546
544
'@typescript-eslint/no-confusing-void-expression' : 'off' , // TODO: enable with ignoreArrowShorthand
547
545
'@typescript-eslint/no-deprecated' : 'off' ,
548
- '@typescript-eslint/no-dupe-class-members' : 'error' ,
546
+ '@typescript-eslint/no-dupe-class-members' : 'off' , // now in core
549
547
'@typescript-eslint/no-duplicate-enum-values' : 'error' ,
550
548
'@typescript-eslint/no-duplicate-type-constituents' : 'error' ,
551
549
'@typescript-eslint/no-dynamic-delete' : 'off' ,
552
- '@typescript-eslint/no-empty-function' : 'error' ,
550
+ '@typescript-eslint/no-empty-function' : 'off' , // now in core
553
551
'@typescript-eslint/no-empty-object-type' : 'error' ,
554
552
'@typescript-eslint/no-explicit-any' : 'off' , // TODO: error
555
553
'@typescript-eslint/no-extra-non-null-assertion' : 'error' ,
@@ -565,10 +563,10 @@ export default tsConfig(
565
563
ignoreProperties : true ,
566
564
} ,
567
565
] ,
568
- '@typescript-eslint/no-invalid-this' : 'error' ,
566
+ '@typescript-eslint/no-invalid-this' : 'off' , // now in core
569
567
'@typescript-eslint/no-invalid-void-type' : 'error' ,
570
568
'@typescript-eslint/no-loop-func' : 'error' ,
571
- '@typescript-eslint/no-magic-numbers' : 'off' ,
569
+ '@typescript-eslint/no-magic-numbers' : 'off' , // now in core
572
570
'@typescript-eslint/no-meaningless-void-operator' : 'error' ,
573
571
'@typescript-eslint/no-misused-new' : 'error' ,
574
572
'@typescript-eslint/no-misused-promises' : 'error' ,
@@ -582,7 +580,7 @@ export default tsConfig(
582
580
'@typescript-eslint/no-require-imports' : 'error' ,
583
581
'@typescript-eslint/no-restricted-imports' : 'error' ,
584
582
'@typescript-eslint/no-restricted-types' : 'error' ,
585
- '@typescript-eslint/no-shadow' : 'error' ,
583
+ '@typescript-eslint/no-shadow' : 'off' , // now in core
586
584
'@typescript-eslint/no-this-alias' : 'error' ,
587
585
'@typescript-eslint/no-unnecessary-boolean-literal-compare' : 'error' ,
588
586
'@typescript-eslint/no-unnecessary-condition' : 'off' , // TODO: temporary disable
@@ -604,7 +602,7 @@ export default tsConfig(
604
602
'@typescript-eslint/no-unsafe-return' : 'off' , // TODO: consider
605
603
'@typescript-eslint/no-unsafe-type-assertion' : 'off' , // TODO: consider
606
604
'@typescript-eslint/no-unsafe-unary-minus' : 'error' ,
607
- '@typescript-eslint/no-unused-expressions' : 'error' ,
605
+ '@typescript-eslint/no-unused-expressions' : 'off' , // now in core
608
606
'@typescript-eslint/no-unused-vars' : [
609
607
'error' ,
610
608
{
@@ -617,8 +615,8 @@ export default tsConfig(
617
615
ignoreRestSiblings : true ,
618
616
} ,
619
617
] ,
620
- '@typescript-eslint/no-use-before-define' : 'off' ,
621
- '@typescript-eslint/no-useless-constructor' : 'error' ,
618
+ '@typescript-eslint/no-use-before-define' : 'off' , // now in core
619
+ '@typescript-eslint/no-useless-constructor' : 'off' , // now in core
622
620
'@typescript-eslint/no-useless-empty-export' : 'error' ,
623
621
'@typescript-eslint/no-wrapper-object-types' : 'error' ,
624
622
'@typescript-eslint/non-nullable-type-assertion-style' : 'off' , //TODO: temporarily disabled
@@ -672,26 +670,13 @@ export default tsConfig(
672
670
673
671
// Below list intentionally includes ESLint rules disabled above.
674
672
// If any of the above rules are enabled in the future, they must still be disabled for TS files.
675
- 'class-methods-use-this' : 'off' ,
676
673
'consistent-return' : 'off' ,
677
- 'default-param-last' : 'off' ,
678
674
'dot-notation' : 'off' ,
679
- 'init-declarations' : 'off' ,
680
- 'max-params' : 'off' ,
681
- 'no-array-constructor' : 'off' ,
682
- 'no-dupe-class-members' : 'off' ,
683
- 'no-empty-function' : 'off' ,
684
675
'no-implied-eval' : 'off' ,
685
- 'no-invalid-this' : 'off' ,
686
676
'no-loop-func' : 'off' ,
687
- 'no-magic-numbers' : 'off' ,
688
677
'no-redeclare' : 'off' ,
689
678
'no-restricted-imports' : 'off' ,
690
- 'no-shadow' : 'off' ,
691
- 'no-unused-expressions' : 'off' ,
692
679
'no-unused-vars' : 'off' ,
693
- 'no-use-before-define' : 'off' ,
694
- 'no-useless-constructor' : 'off' ,
695
680
'only-throw-error' : 'off' ,
696
681
'prefer-destructuring' : 'off' ,
697
682
'prefer-promise-reject-errors' : 'off' ,
@@ -816,7 +801,10 @@ export default tsConfig(
816
801
allowEmoji : true ,
817
802
} ,
818
803
] ,
804
+ 'n/no-top-level-await' : 'off' ,
819
805
// TODO: remove when fetch/cpSync stabilizes across all node versions
806
+ // fetch is not supported until Node.js 21.0.0
807
+ // fs.cpSync is not supported until Node.js 22.3.0
820
808
'n/no-unsupported-features/node-builtins' : [
821
809
'error' ,
822
810
{
0 commit comments