Skip to content

Commit

Permalink
Use recommended typescript eslint rules requiring type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
LabhanshAgrawal committed Apr 7, 2021
1 parent c3f91fc commit 570aab6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
"impliedStrict": true,
"experimentalObjectRestSpread": true
},
"allowImportExportEverywhere": true
"allowImportExportEverywhere": true,
"project": [
"./tsconfig.eslint.json"
]
},
"env": {
"es6": true,
Expand Down Expand Up @@ -89,6 +92,7 @@
],
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier"
],
"rules": {
Expand All @@ -99,7 +103,18 @@
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/ban-types": "off",
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"]
"@typescript-eslint/no-shadow": ["error"],
"@typescript-eslint/await-thenable": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/restrict-plus-operands": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/unbound-method": "off"
}
}
]
Expand Down
13 changes: 13 additions & 0 deletions tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "./tsconfig.base.json",
"include": [
"./app/",
"./lib/",
"./test/",
"./cli/",
"./",
],
"files": [
"./app/index.d.ts"
]
}

0 comments on commit 570aab6

Please sign in to comment.