Skip to content

Commit

Permalink
chore: configure eslint vs code plugin (#423)
Browse files Browse the repository at this point in the history
Summary:

The .eslintrc.yaml is located in site, rather than the root of the
repository. The VS Code plugin has a CWD of the repository root, so it
looks for tsconfig.test.json in the root rather in site.

See Also:

- microsoft/vscode-eslint#196
- typescript-eslint/typescript-eslint#251
  • Loading branch information
G r e y committed Mar 14, 2022
1 parent 6c83907 commit 60f3cf6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,6 @@
"webrtc",
"xerrors",
"yamux"
]
],
"eslint.workingDirectories": ["./site"]
}
5 changes: 3 additions & 2 deletions site/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ extends:
parser: "@typescript-eslint/parser"
parserOptions:
ecmaVersion: 2018
project:
- "./tsconfig.test.json"
project: "./tsconfig.test.json"
sourceType: module
ecmaFeatures:
jsx: true
# REMARK(Grey): We might want to move this to repository root eventually to
# lint multiple projects (supply array to project property).
tsconfigRootDir: "./"
plugins:
- "@typescript-eslint"
Expand Down

0 comments on commit 60f3cf6

Please sign in to comment.