chore: configure eslint vs code plugin (#423)

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:

- https://github.com/microsoft/vscode-eslint/issues/196
- https://github.com/typescript-eslint/typescript-eslint/issues/251
This commit is contained in:
G r e y 2022-03-13 20:02:49 -04:00 committed by GitHub
parent 6c83907b1b
commit 60f3cf6552
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -75,5 +75,6 @@
"webrtc",
"xerrors",
"yamux"
]
],
"eslint.workingDirectories": ["./site"]
}

View File

@ -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"