Skip to content

Commit 60f3cf6

Browse files
author
G r e y
authored
chore: configure eslint vs code plugin (coder#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: - microsoft/vscode-eslint#196 - typescript-eslint/typescript-eslint#251
1 parent 6c83907 commit 60f3cf6

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,6 @@
7575
"webrtc",
7676
"xerrors",
7777
"yamux"
78-
]
78+
],
79+
"eslint.workingDirectories": ["./site"]
7980
}

site/.eslintrc.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ extends:
1717
parser: "@typescript-eslint/parser"
1818
parserOptions:
1919
ecmaVersion: 2018
20-
project:
21-
- "./tsconfig.test.json"
20+
project: "./tsconfig.test.json"
2221
sourceType: module
2322
ecmaFeatures:
2423
jsx: true
24+
# REMARK(Grey): We might want to move this to repository root eventually to
25+
# lint multiple projects (supply array to project property).
2526
tsconfigRootDir: "./"
2627
plugins:
2728
- "@typescript-eslint"

0 commit comments

Comments
 (0)