Skip to content

Commit

Permalink
feat(typescript): add only-throw-error and `use-unknown-in-catch-ca…
Browse files Browse the repository at this point in the history
…llback-variable` rules
  • Loading branch information
ybiquitous committed Apr 1, 2024
1 parent 852a5bb commit 06f582a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"ybiq": "^17.2.0"
},
"peerDependencies": {
"@typescript-eslint/eslint-plugin": ">=7.1.0",
"@typescript-eslint/eslint-plugin": ">=7.4.0",
"eslint": ">=8.50.0"
},
"peerDependenciesMeta": {
Expand Down
4 changes: 3 additions & 1 deletion rules/plugins/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ module.exports = {
"@typescript-eslint/no-restricted-imports": "off", // eslint-disable-line sort-keys
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error", // eslint-disable-line sort-keys
"@typescript-eslint/no-throw-literal": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/no-unnecessary-qualifier": "warn",
Expand All @@ -101,6 +100,8 @@ module.exports = {
"@typescript-eslint/no-useless-empty-export": "error",
"@typescript-eslint/no-useless-template-literals": "error",
"@typescript-eslint/non-nullable-type-assertion-style": "warn",
"no-throw-literal": "off",
"@typescript-eslint/only-throw-error": "error", // eslint-disable-line sort-keys
"@typescript-eslint/padding-line-between-statements": "off",
"@typescript-eslint/parameter-properties": "warn",
"@typescript-eslint/prefer-as-const": "error",
Expand Down Expand Up @@ -134,5 +135,6 @@ module.exports = {
"@typescript-eslint/switch-exhaustiveness-check": "warn",
"@typescript-eslint/typedef": "off",
"@typescript-eslint/unified-signatures": "error",
"@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
},
};

0 comments on commit 06f582a

Please sign in to comment.