Skip to content

Commit

Permalink
Update typescript-eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeckem committed Oct 22, 2024
1 parent 1ce5f11 commit 8976b63
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 120 deletions.
36 changes: 12 additions & 24 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
// Can be removed once https://github.com/jsx-eslint/eslint-plugin-react/issues/3602 is closed
"suppressDeprecatedPropertyWarnings": true
},
"plugins": ["@typescript-eslint", "import", "unused-imports", "header", "react", "react-hooks"],
"env": {
"node": true,
Expand Down Expand Up @@ -67,37 +71,21 @@
{
"vars": "all",
"varsIgnorePattern": "^_",
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],

// Allow {} again
"@typescript-eslint/ban-types": [
// Allow {} as type
"@typescript-eslint/no-empty-object-type": "off",

"@typescript-eslint/no-unused-expressions": [
"error",
{
"extendDefaults": false,
"types": {
"String": {
"message": "Use string instead",
"fixWith": "string"
},
"Boolean": {
"message": "Use boolean instead",
"fixWith": "boolean"
},
"Number": {
"message": "Use number instead",
"fixWith": "number"
},
"Symbol": {
"message": "Use symbol instead",
"fixWith": "symbol"
},
"Function": {
"message": "Use typed function signatures instead"
}
}
"allowShortCircuit": true,
"allowTernary": true
}
],

Expand Down
Loading

0 comments on commit 8976b63

Please sign in to comment.