-
Notifications
You must be signed in to change notification settings - Fork 887
fix(site): vscode eslint plugin working directory #423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great fix! Thanks @vapurrmaid 🥳
ah crap, this breaks lint scripts...so it fixed one thing but broke another 😂. I will look into this! |
Codecov Report
@@ Coverage Diff @@
## main #423 +/- ##
==========================================
+ Coverage 67.19% 68.16% +0.97%
==========================================
Files 155 159 +4
Lines 9044 9226 +182
Branches 73 73
==========================================
+ Hits 6077 6289 +212
+ Misses 2340 2316 -24
+ Partials 627 621 -6
Continue to review full report at Codecov.
|
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
d9da0f3
to
13e35e2
Compare
@kylecarbs Now that I realize the errors were specific to VS Code plugin, I just had to tell it where our |
@kylecarbs I'm not authorized to merge the PR 😂. Are you able to set something up for me to be able to merge? |
Oh... hahahah yes I'll fix now! |
@vapurrmaid is there a message that displays? I'm not sure why merge would be blocked. |
Yea! Here's a screenshot and a link to that doc |
@vapurrmaid does it work now? |
Yes 🙌🏻 , thank you 🎊 ! I have now officially contributed (as a primary commit author) to v2, very exciting 🎉 🎉 |
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 (resolving
"./tsconfig.test.json"
)Impact of Change
No more red squiggles in VS Code on every open TypeScript (ts, tsx) file in
site
. I verified that the VS Code ESLint Plugin corrected code automatically (and applied yellow and red squiggles as appropriate). This may not have worked identically before, so we should see an improvement to the TS development experience insite
🎉 🎊 .See Also
tsconfigRootDir
relative to the.eslintrc
file typescript-eslint/typescript-eslint#251Personal Note
This is my first primary author commit in this repo!