Skip to content

Commit 0b25758

Browse files
committed
Add @typescript-eslint/prefer-find rule
https://typescript-eslint.io/rules/prefer-find/
1 parent ae44391 commit 0b25758

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ module.exports = {
365365
],
366366

367367
// 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.
368-
// TODO: Try to re-enable this again in 2023.
368+
// TODO: Try to re-enable this again in 2026.
369369
// '@typescript-eslint/method-signature-style': 'error',
370370

371371
// We use `@typescript-eslint/naming-convention` in favor of `camelcase`.
@@ -394,7 +394,7 @@ module.exports = {
394394
}
395395
],
396396

397-
// TODO: Try to enable this again in 2023.
397+
// TODO: Try to enable this again in 2025.
398398
// 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.
399399
// For example: https://github.com/sindresorhus/refined-github/pull/2391#discussion_r318995182
400400
// '@typescript-eslint/no-explicit-any': [
@@ -518,7 +518,7 @@ module.exports = {
518518
// `no-unnecessary-condition` is essentially a stricter version of `no-constant-condition`, but that isn't currently enabled
519519
'no-constant-condition': 'error',
520520

521-
// TODO: Try to enable this again in 2023 *if* the following are resolved:
521+
// TODO: Try to enable this again in 2025 *if* the following are resolved:
522522
// - https://github.com/microsoft/TypeScript/issues/36393
523523
// - The rule needs a way to ignore runtime type-checks: https://github.com/sindresorhus/refined-github/pull/3168
524524
// - Run the rule on https://github.com/sindresorhus/refined-github and ensure there are no false-positives
@@ -582,6 +582,7 @@ module.exports = {
582582
}
583583
],
584584
'@typescript-eslint/prefer-as-const': 'error',
585+
'@typescript-eslint/prefer-find': 'error',
585586
'@typescript-eslint/prefer-for-of': 'error',
586587
'@typescript-eslint/prefer-function-type': 'error',
587588
'@typescript-eslint/prefer-includes': 'error',

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@
4545
"simple"
4646
],
4747
"devDependencies": {
48-
"@typescript-eslint/eslint-plugin": "^6.19.0",
49-
"@typescript-eslint/parser": "^6.19.0",
48+
"@typescript-eslint/eslint-plugin": "^6.21.0",
49+
"@typescript-eslint/parser": "^6.21.0",
5050
"ava": "^2.4.0",
5151
"eslint": "^8.56.0",
5252
"typescript": "^5.3.3"
5353
},
5454
"peerDependencies": {
55-
"@typescript-eslint/eslint-plugin": ">=6.19.0",
56-
"@typescript-eslint/parser": ">=6.19.0",
55+
"@typescript-eslint/eslint-plugin": ">=6.21.0",
56+
"@typescript-eslint/parser": ">=6.21.0",
5757
"eslint": ">=8.56.0",
5858
"typescript": ">=5.0.0"
5959
}

0 commit comments

Comments
 (0)