Skip to content
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

JoshuaKGoldberg
Copy link
Member

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 unless options.project was also set.

@typescript-eslint
Copy link
Contributor

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.

Copy link

netlify bot commented Dec 26, 2023

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 26a736c
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/6599ea0db0e46100085c8394
😎 Deploy Preview https://deploy-preview-8136--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 90 (🔴 down 9 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 98 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@JoshuaKGoldberg JoshuaKGoldberg merged commit 5a33c2b into typescript-eslint:main Jan 7, 2024
57 checks passed
@JoshuaKGoldberg JoshuaKGoldberg deleted the project-service-only-if-needed branch January 7, 2024 00:50
(process.env.TYPESCRIPT_ESLINT_EXPERIMENTAL_TSSERVER === 'true' &&
options.EXPERIMENTAL_useProjectService !== false)
options.EXPERIMENTAL_useProjectService ||
(options.project &&
Copy link
Contributor

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?

Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

@fisker fisker Jan 7, 2024

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?

Copy link
Member Author

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants