@@ -55,7 +55,7 @@ export default tsConfig(
5555 'internal-rules/require-to-string-tag' : 'off' ,
5656
5757 //////////////////////////////////////////////////////////////////////////////
58- // `eslint-plugin-n` rule list based on `v17.14 .x`
58+ // `eslint-plugin-n` rule list based on `v17.21 .x`
5959 //////////////////////////////////////////////////////////////////////////////
6060
6161 // Rules
@@ -82,6 +82,7 @@ export default tsConfig(
8282 'n/no-restricted-import' : 'off' ,
8383 'n/no-restricted-require' : 'off' ,
8484 'n/no-sync' : 'off' , // TODO: consider enabling, currently triggers with executeSync/graphqlSync, without ability to add exceptions
85+ 'n/no-top-level-await' : 'error' ,
8586 'n/no-unpublished-bin' : 'error' ,
8687 'n/no-unpublished-import' : 'error' ,
8788 'n/no-unpublished-require' : 'error' ,
@@ -105,12 +106,13 @@ export default tsConfig(
105106 'n/shebang' : 'error' ,
106107
107108 //////////////////////////////////////////////////////////////////////////////
108- // `eslint-plugin-import` rule list based on `v2.31 .x`
109+ // `eslint-plugin-import` rule list based on `v2.32 .x`
109110 //////////////////////////////////////////////////////////////////////////////
110111
111112 // Static analysis
112113 // https://github.com/benmosher/eslint-plugin-import#static-analysis
113114 'import/default' : 'error' ,
115+ 'import/enforce-node-protocol-usage' : [ 'error' , 'always' ] ,
114116 'import/named' : 'error' ,
115117 'import/namespace' : 'error' ,
116118 'import/no-absolute-path' : 'error' ,
@@ -228,7 +230,7 @@ export default tsConfig(
228230 'simple-import-sort/exports' : 'off' , // TODO: error
229231
230232 //////////////////////////////////////////////////////////////////////////////
231- // ESLint builtin rules list based on `v9.16 .x`
233+ // ESLint builtin rules list based on `v9.31 .x`
232234 //////////////////////////////////////////////////////////////////////////////
233235
234236 // Possible Errors
@@ -275,6 +277,7 @@ export default tsConfig(
275277 'no-sparse-arrays' : 'error' ,
276278 'no-template-curly-in-string' : 'error' ,
277279 'no-this-before-super' : 'error' ,
280+ 'no-unassigned-vars' : 'error' ,
278281 'no-undef' : 'error' ,
279282 'no-unexpected-multiline' : 'error' ,
280283 'no-unmodified-loop-condition' : 'error' ,
@@ -492,7 +495,7 @@ export default tsConfig(
492495 } ,
493496 rules : {
494497 //////////////////////////////////////////////////////////////////////////
495- // `@typescript-eslint/eslint-plugin` rule list based on `v8.16 .x`
498+ // `@typescript-eslint/eslint-plugin` rule list based on `v8.37 .x`
496499 //////////////////////////////////////////////////////////////////////////
497500
498501 // Supported Rules
@@ -513,7 +516,7 @@ export default tsConfig(
513516 ] ,
514517 '@typescript-eslint/ban-tslint-comment' : 'error' ,
515518 '@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
517520 '@typescript-eslint/consistent-generic-constructors' : 'error' ,
518521 '@typescript-eslint/consistent-indexed-object-style' : [
519522 'error' ,
@@ -524,32 +527,27 @@ export default tsConfig(
524527 '@typescript-eslint/consistent-type-definitions' : 'error' ,
525528 '@typescript-eslint/consistent-type-exports' : 'error' ,
526529 '@typescript-eslint/consistent-type-imports' : 'error' ,
527- '@typescript-eslint/default-param-last' : 'error' ,
530+ '@typescript-eslint/default-param-last' : 'off' , // now in core
528531 '@typescript-eslint/dot-notation' : 'error' ,
529532 '@typescript-eslint/explicit-function-return-type' : 'off' , // TODO: consider
530533 '@typescript-eslint/explicit-member-accessibility' : 'off' , // TODO: consider
531534 '@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
539537 '@typescript-eslint/member-ordering' : 'error' ,
540538 '@typescript-eslint/method-signature-style' : 'error' ,
541539 '@typescript-eslint/naming-convention' : 'off' ,
542- '@typescript-eslint/no-array-constructor' : 'error' ,
540+ '@typescript-eslint/no-array-constructor' : 'off' , // now in core
543541 '@typescript-eslint/no-array-delete' : 'error' ,
544542 '@typescript-eslint/no-base-to-string' : 'error' ,
545543 '@typescript-eslint/no-confusing-non-null-assertion' : 'error' ,
546544 '@typescript-eslint/no-confusing-void-expression' : 'off' , // TODO: enable with ignoreArrowShorthand
547545 '@typescript-eslint/no-deprecated' : 'off' ,
548- '@typescript-eslint/no-dupe-class-members' : 'error' ,
546+ '@typescript-eslint/no-dupe-class-members' : 'off' , // now in core
549547 '@typescript-eslint/no-duplicate-enum-values' : 'error' ,
550548 '@typescript-eslint/no-duplicate-type-constituents' : 'error' ,
551549 '@typescript-eslint/no-dynamic-delete' : 'off' ,
552- '@typescript-eslint/no-empty-function' : 'error' ,
550+ '@typescript-eslint/no-empty-function' : 'off' , // now in core
553551 '@typescript-eslint/no-empty-object-type' : 'error' ,
554552 '@typescript-eslint/no-explicit-any' : 'off' , // TODO: error
555553 '@typescript-eslint/no-extra-non-null-assertion' : 'error' ,
@@ -565,10 +563,10 @@ export default tsConfig(
565563 ignoreProperties : true ,
566564 } ,
567565 ] ,
568- '@typescript-eslint/no-invalid-this' : 'error' ,
566+ '@typescript-eslint/no-invalid-this' : 'off' , // now in core
569567 '@typescript-eslint/no-invalid-void-type' : 'error' ,
570568 '@typescript-eslint/no-loop-func' : 'error' ,
571- '@typescript-eslint/no-magic-numbers' : 'off' ,
569+ '@typescript-eslint/no-magic-numbers' : 'off' , // now in core
572570 '@typescript-eslint/no-meaningless-void-operator' : 'error' ,
573571 '@typescript-eslint/no-misused-new' : 'error' ,
574572 '@typescript-eslint/no-misused-promises' : 'error' ,
@@ -582,7 +580,7 @@ export default tsConfig(
582580 '@typescript-eslint/no-require-imports' : 'error' ,
583581 '@typescript-eslint/no-restricted-imports' : 'error' ,
584582 '@typescript-eslint/no-restricted-types' : 'error' ,
585- '@typescript-eslint/no-shadow' : 'error' ,
583+ '@typescript-eslint/no-shadow' : 'off' , // now in core
586584 '@typescript-eslint/no-this-alias' : 'error' ,
587585 '@typescript-eslint/no-unnecessary-boolean-literal-compare' : 'error' ,
588586 '@typescript-eslint/no-unnecessary-condition' : 'off' , // TODO: temporary disable
@@ -604,7 +602,7 @@ export default tsConfig(
604602 '@typescript-eslint/no-unsafe-return' : 'off' , // TODO: consider
605603 '@typescript-eslint/no-unsafe-type-assertion' : 'off' , // TODO: consider
606604 '@typescript-eslint/no-unsafe-unary-minus' : 'error' ,
607- '@typescript-eslint/no-unused-expressions' : 'error' ,
605+ '@typescript-eslint/no-unused-expressions' : 'off' , // now in core
608606 '@typescript-eslint/no-unused-vars' : [
609607 'error' ,
610608 {
@@ -617,8 +615,8 @@ export default tsConfig(
617615 ignoreRestSiblings : true ,
618616 } ,
619617 ] ,
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
622620 '@typescript-eslint/no-useless-empty-export' : 'error' ,
623621 '@typescript-eslint/no-wrapper-object-types' : 'error' ,
624622 '@typescript-eslint/non-nullable-type-assertion-style' : 'off' , //TODO: temporarily disabled
@@ -672,26 +670,13 @@ export default tsConfig(
672670
673671 // Below list intentionally includes ESLint rules disabled above.
674672 // 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' ,
676673 'consistent-return' : 'off' ,
677- 'default-param-last' : 'off' ,
678674 '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' ,
684675 'no-implied-eval' : 'off' ,
685- 'no-invalid-this' : 'off' ,
686676 'no-loop-func' : 'off' ,
687- 'no-magic-numbers' : 'off' ,
688677 'no-redeclare' : 'off' ,
689678 'no-restricted-imports' : 'off' ,
690- 'no-shadow' : 'off' ,
691- 'no-unused-expressions' : 'off' ,
692679 'no-unused-vars' : 'off' ,
693- 'no-use-before-define' : 'off' ,
694- 'no-useless-constructor' : 'off' ,
695680 'only-throw-error' : 'off' ,
696681 'prefer-destructuring' : 'off' ,
697682 'prefer-promise-reject-errors' : 'off' ,
@@ -816,7 +801,10 @@ export default tsConfig(
816801 allowEmoji : true ,
817802 } ,
818803 ] ,
804+ 'n/no-top-level-await' : 'off' ,
819805 // 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
820808 'n/no-unsupported-features/node-builtins' : [
821809 'error' ,
822810 {
0 commit comments