-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(typescript-estree): only create project service from env setting if project is enabled #8136
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
fix(typescript-estree): only create project service from env setting if project is enabled #8136
Conversation
… project is enabled
Thanks for the PR, @JoshuaKGoldberg! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
(process.env.TYPESCRIPT_ESLINT_EXPERIMENTAL_TSSERVER === 'true' && | ||
options.EXPERIMENTAL_useProjectService !== false) | ||
options.EXPERIMENTAL_useProjectService || | ||
(options.project && |
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.
Hello @JoshuaKGoldberg , should we check it's non-empty?
I don't know this project
options, asking this only because I use project:[]
in prettier and eslint-plugin-unicorn, I don't remember why, maybe prevent search for tsconfig.json
?
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.
Looking at the docs, maybe I should use project: false
?
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.
Hmm, yes, or project: null
.
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.
Back to my question, should we treat []
as false here?
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.
Good question 🤔. My gut instinct is that it should probably be an error. I'm not sure though... Filed #8210.
PR Checklist
Overview
I spent some time trying to investigate #8131's unit test failures. I made a bit of progress and then realized... wait, why is the project service enabled for either of these rules? We don't normally enable
parserOptions.project
for un-typed lint rules. Therefore, I don't think we'd want the presence of the environment variable to enable the project service unlessoptions.project
was also set.