Skip to content

Commit

Permalink
feat: add better typescript rules for eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
ajhenry committed Jun 11, 2024
1 parent 7165caa commit 0d6c991
Show file tree
Hide file tree
Showing 3 changed files with 543 additions and 34 deletions.
23 changes: 22 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
{
"extends": "next/core-web-vitals"
"extends": [
"next/core-web-vitals",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-type-checked"
],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"parserOptions": {
"project": ["./tsconfig.json"] // Specify it only for TypeScript files
// or `project: true` in typescript-eslint version >= 5.52.0
},
"root": true,
"rules": {
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unsafe-call": "warn",
"@typescript-eslint/no-unsafe-argument": "warn",
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
"@typescript-eslint/no-floating-promises": "warn"
}
}
Loading

0 comments on commit 0d6c991

Please sign in to comment.