Skip to content

Commit ecc1c11

Browse files
committed
Add @typescript-eslint/no-unsafe-function-type rule
https://typescript-eslint.io/rules/no-unsafe-function-type/
1 parent b9f8658 commit ecc1c11

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ module.exports = {
159159
message: 'The `object` type is hard to use. Use `Record<string, unknown>` instead. See: https://github.com/typescript-eslint/typescript-eslint/pull/848',
160160
fixWith: 'Record<string, unknown>'
161161
},
162-
Function: 'Use a specific function type instead, like `() => void`.',
163162
null: {
164163
message: 'Use `undefined` instead. See: https://github.com/sindresorhus/meta/issues/7',
165164
fixWith: 'undefined'
@@ -543,6 +542,7 @@ module.exports = {
543542
'@typescript-eslint/no-unsafe-call': 'error',
544543
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
545544
'@typescript-eslint/no-unsafe-enum-comparison': 'error',
545+
'@typescript-eslint/no-unsafe-function-type': 'error',
546546

547547
// Disabled until TypeScrpt supports the `node:` protocol.
548548
// '@typescript-eslint/no-unsafe-member-access': '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": "^7.16.0",
49-
"@typescript-eslint/parser": "^7.16.0",
48+
"@typescript-eslint/eslint-plugin": "^7.17.0",
49+
"@typescript-eslint/parser": "^7.17.0",
5050
"ava": "^6.1.2",
5151
"eslint": "^8.56.0",
5252
"typescript": "^5.3.3"
5353
},
5454
"peerDependencies": {
55-
"@typescript-eslint/eslint-plugin": ">=7.16.0",
56-
"@typescript-eslint/parser": ">=7.16.0",
55+
"@typescript-eslint/eslint-plugin": ">=7.17.0",
56+
"@typescript-eslint/parser": ">=7.17.0",
5757
"eslint": ">=8.56.0",
5858
"typescript": ">=5.0.0"
5959
}

0 commit comments

Comments
 (0)