Skip to content

Commit

Permalink
Add options to @typescript-eslint/no-throw-literal
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Dec 21, 2021
1 parent 4a92ee0 commit a829aa2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,13 @@ module.exports = {
}
],
'no-throw-literal': 'off',
'@typescript-eslint/no-throw-literal': 'error',
'@typescript-eslint/no-throw-literal': [
'error',
{
allowThrowingAny: false,
allowThrowingUnknown: false
}
],
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',

// `no-unnecessary-condition` is essentially a stricter version of `no-constant-condition`, but that isn't currently enabled
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@
"simple"
],
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"@typescript-eslint/eslint-plugin": "^5.8.0",
"@typescript-eslint/parser": "^5.8.0",
"ava": "^2.4.0",
"eslint": "^7.8.1",
"temp-write": "^4.0.0",
"typescript": ">=4.4"
},
"peerDependencies": {
"@typescript-eslint/eslint-plugin": ">=5.0.0",
"@typescript-eslint/eslint-plugin": ">=5.8.0",
"eslint": ">=8.0.0",
"typescript": ">=4.4"
}
Expand Down

0 comments on commit a829aa2

Please sign in to comment.