From 13e35e22c9c3fa5c32b7681b363432db1c681dfe Mon Sep 17 00:00:00 2001 From: G r e y Date: Sun, 13 Mar 2022 21:18:37 +0000 Subject: [PATCH] chore: configure eslint vs code plugin 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 --- .vscode/settings.json | 3 ++- site/.eslintrc.yaml | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index a503c49b57bc2..1f737aeec2508 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -75,5 +75,6 @@ "webrtc", "xerrors", "yamux" - ] + ], + "eslint.workingDirectories": ["./site"] } diff --git a/site/.eslintrc.yaml b/site/.eslintrc.yaml index d6c6be9eb6b95..436bd1a2e40e2 100644 --- a/site/.eslintrc.yaml +++ b/site/.eslintrc.yaml @@ -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"