-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
chore(v2): fix eslint TS setup #2949
Conversation
@yangshun not to merge now, because there are a few rules we could disable and configs to rework, otherwise people will likely be blocked |
Deploy preview for docusaurus-2 ready! Built with commit 3b481f3 |
Deploy preview for docusaurus-2 ready! Built with commit a07f6a6 |
Hey, To fix the current eslint setup for TS, I had to disable (warn instead of errors) multiple rules. I fixed some non-intrusive issues (like FB headers) but not all of them to avoid git conflicts for now. There are 35 possible fixes with the --fix option. I didn't apply those fixes yet but if people commit those files, the --fix will be applied at commit time so it may produce less git conflicts I think it can be a good MLH issue to re-enable some rules that I had to disable, by manually fixing remaining errors one by one. |
All the CI checks are failing though :/ |
Yes, was trying to fix that :D Actually found the reason. TIL about https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html ^^ |
Because we need a specific parser for TS integration, otherwise TS constructs like !, as, as const etc are not understood correctly.
in my IDE I get a lot of errors such as:
And due to these parsing errors, eslint is unable to check the rest of the files.
BTW, the
yarn lint
command actually does not lint TS files ^^eslint --cache "**/*.js"
Now I can see all the lint errors 🤪