Skip to content

Commit

Permalink
Add @typescript-eslint/no-unsafe-function-type rule
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jul 23, 2024
1 parent b9f8658 commit ecc1c11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ module.exports = {
message: 'The `object` type is hard to use. Use `Record<string, unknown>` instead. See: https://github.com/typescript-eslint/typescript-eslint/pull/848',
fixWith: 'Record<string, unknown>'
},
Function: 'Use a specific function type instead, like `() => void`.',
null: {
message: 'Use `undefined` instead. See: https://github.com/sindresorhus/meta/issues/7',
fixWith: 'undefined'
Expand Down Expand Up @@ -543,6 +542,7 @@ module.exports = {
'@typescript-eslint/no-unsafe-call': 'error',
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
'@typescript-eslint/no-unsafe-enum-comparison': 'error',
'@typescript-eslint/no-unsafe-function-type': 'error',

// Disabled until TypeScrpt supports the `node:` protocol.
// '@typescript-eslint/no-unsafe-member-access': 'error',
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@
"simple"
],
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^7.16.0",
"@typescript-eslint/parser": "^7.16.0",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"ava": "^6.1.2",
"eslint": "^8.56.0",
"typescript": "^5.3.3"
},
"peerDependencies": {
"@typescript-eslint/eslint-plugin": ">=7.16.0",
"@typescript-eslint/parser": ">=7.16.0",
"@typescript-eslint/eslint-plugin": ">=7.17.0",
"@typescript-eslint/parser": ">=7.17.0",
"eslint": ">=8.56.0",
"typescript": ">=5.0.0"
}
Expand Down

0 comments on commit ecc1c11

Please sign in to comment.