@@ -79,13 +79,10 @@ module.exports = {
79
79
fixWith : 'Record<string, unknown>'
80
80
} ,
81
81
Function : 'Use a specific function type instead, like `() => void`.' ,
82
-
83
- // TODO: Try to enable this in 2021.
84
- // null: {
85
- // message: 'Use `undefined` instead. See: https://github.com/sindresorhus/meta/issues/7',
86
- // fixWith: 'undefined'
87
- // }
88
-
82
+ null : {
83
+ message : 'Use `undefined` instead. See: https://github.com/sindresorhus/meta/issues/7' ,
84
+ fixWith : 'undefined'
85
+ } ,
89
86
'[]' : 'Don\'t use the empty array type `[]`. It only allows empty arrays. Use `SomeType[]` instead.' ,
90
87
'[[]]' : 'Don\'t use `[[]]`. It only allows an array with a single element which is an empty array. Use `SomeType[][]` instead.' ,
91
88
'[[[]]]' : 'Don\'t use `[[[]]]`. Use `SomeType[][][]` instead.' ,
@@ -132,7 +129,7 @@ module.exports = {
132
129
}
133
130
] ,
134
131
135
- // This rule is fine. I just don't want to deal with the churn yet. Enable this in 2022 .
132
+ // This rule is fine. I just don't want to deal with the churn yet. Enable this in 2023 .
136
133
// '@typescript-eslint/consistent-type-definitions': [
137
134
// 'error',
138
135
// 'type'
@@ -268,7 +265,7 @@ module.exports = {
268
265
] ,
269
266
270
267
// Disabled for now as it causes too many weird TypeScript issues. I'm not sure whether the problems are caused by bugs in TS or problems in my types.
271
- // TODO: Try to re-enable this again in 2022 .
268
+ // TODO: Try to re-enable this again in 2023 .
272
269
// '@typescript-eslint/method-signature-style': 'error',
273
270
274
271
// We use `@typescript-eslint/naming-convention` in favor of `camelcase`.
@@ -365,7 +362,7 @@ module.exports = {
365
362
}
366
363
] ,
367
364
368
- // TODO: Try to enable this again in 2022 .
365
+ // TODO: Try to enable this again in 2023 .
369
366
// Disabled for now. This is a great rule. It's just that TypeScript is not good enough yet to not use `any` in many places.
370
367
// For example: https://github.com/sindresorhus/refined-github/pull/2391#discussion_r318995182
371
368
// '@typescript-eslint/no-explicit-any': [
@@ -484,7 +481,6 @@ module.exports = {
484
481
'no-constant-condition' : 'error' ,
485
482
486
483
// TODO: Try to enable this again in 2023 *if* the following are resolved:
487
- // - https://github.com/microsoft/TypeScript/issues/13778 (otherwise, it will report on if checks for elements extracted from array)
488
484
// - https://github.com/microsoft/TypeScript/issues/36393
489
485
// - The rule needs a way to ignore runtime type-checks: https://github.com/sindresorhus/refined-github/pull/3168
490
486
// - Run the rule on https://github.com/sindresorhus/refined-github and ensure there are no false-positives
@@ -612,7 +608,7 @@ module.exports = {
612
608
'always'
613
609
] ,
614
610
615
- // TODO: Reconsider enabling it again in 2021 .
611
+ // TODO: Reconsider enabling it again in 2023 .
616
612
// NOTE: The rule was complete redone in typescript-eslint v3, so this config needs to be changed before this is enabled.
617
613
// Disabled for now as it's too strict.
618
614
// Relevant discussion: https://github.com/sindresorhus/refined-github/pull/2521#discussion_r343013852
@@ -654,6 +650,9 @@ module.exports = {
654
650
// TypeScript might have features not supported in a specific Node.js version.
655
651
'node/no-unsupported-features/es-syntax' : 'off' ,
656
652
'node/no-unsupported-features/es-builtins' : 'off' ,
653
+
654
+ // We use `@typescript-eslint/ban-types` instead.
655
+ 'unicorn/no-null' : 'off'
657
656
} ,
658
657
overrides : [
659
658
{
0 commit comments