Skip to content

Commit

Permalink
fix(eslint): recognise type usage
Browse files Browse the repository at this point in the history
I'm not sure why @typescript-eslint/typescript-estree has been used: I can't see any useful information about it. All documentation points to using @typescript-eslint/parser, which has been installed already. The only noticeable difference is that it doesn't understand when a type has been used, leading to @typescript-eslint/no-unused-vars errors.

I've added a separate TypeScript config file that includes all files in the codebase, as the new parser will error if it tries to load a file that hasn't been included.

Refs #398, #422, ba132cc
  • Loading branch information
thewilkybarkid committed Nov 2, 2021
1 parent ba132cc commit fccd24d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@
"**/*.ts",
"**/*.tsx"
],
"parser": "@typescript-eslint/typescript-estree",
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"project": "./tsconfig.json",
"allowImportExportEverywhere": true
"project": "./tsconfig.dev.json"
},
"extends": [
"plugin:react/recommended",
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ COPY \
.proxyrc \
docker-entrypoint.sh \
jest.config.ts \
tsconfig.dev.json \
./

COPY --from=scripts /app/dist/scripts/ dist/scripts/
Expand Down
7 changes: 7 additions & 0 deletions tsconfig.dev.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"include": [
"**/*",
"**/.*"
]
}

0 comments on commit fccd24d

Please sign in to comment.