-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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(gatsby): Add TS support to eslint and improve speed #20246
Conversation
"no-console": "off", | ||
"no-inner-declarations": "off", | ||
"prettier/prettier": "error", | ||
quotes: ["error", "backtick"], |
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.
We might wanna change this line to something I use in my TS repo with backticks:
https://github.com/LekoArts/gatsby-themes/blob/master/.eslintrc.js#L47-L54
Reasoning: typescript-eslint/typescript-eslint#762
So ESLint otherwise wants to convert double quotes on types to backticks and the TS compiler doesn't like that at all!
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 work! Thank you so much 🤗
Description
--cache
flagnode_modules
inside of packages.Previously we were telling eslint to ignore files from our .gitignore and .prettierignore. This was pragmatic and clever but did not work quite as well as it should have.
For 1, it was ignoring some files that should not have been ignored, and 2 eslint was parsing node_modules in the packages. This was leading to really slow lint times.
Having a dedicated
.eslintignore
file is, unfortunately, another file to maintain, however it is explicitly declarative and allows us more granular control.