Skip to content

docs: blog post on parserOptions.projectService #8031

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

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

JoshuaKGoldberg
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg commented Dec 6, 2023

PR Checklist

Overview

Adds a blog post that describes using parserOptions.projectService (what we currently call parserOptions.EXPERIMENTAL_useProjectService). It sets up a plan to call it projectService in v7, then replace project in v8. Any renaming plans are removed.

Note that this is blocked on:

This is where my mindset is for the option.

💖

@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 6, 2023

Deploy Preview for typescript-eslint failed.

Name Link
🔨 Latest commit 2cead57
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/66c3297ab71b050008606ffd

Copy link
Member

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to see exciting features

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
@JoshuaKGoldberg
Copy link
Member Author

Status update: this is roughly ready for review except parserOptions.projectService no longer outperforms parserOptions.project. That's being investigated in #9571. If we don't get enough fixes on our end & TypeScript's by the time v8 is meant to go stable, we'll have to rephrase the ⚡ Performance section.

@JoshuaKGoldberg JoshuaKGoldberg added the blocked by another PR PRs which are ready to go but waiting on another PR label Jul 18, 2024
@JoshuaKGoldberg JoshuaKGoldberg added blocked by external API Blocked by a tool we depend on exposing an API, such as TypeScript's Type Relationship API blocked by another issue Issues which are not ready because another issue needs to be resolved first labels Jul 18, 2024
@JoshuaKGoldberg JoshuaKGoldberg changed the base branch from main to v8 July 18, 2024 21:49
Copy link

codecov bot commented Jul 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.93%. Comparing base (3d78392) to head (acc7d9f).
Report is 394 commits behind head on main.

Current head acc7d9f differs from pull request most recent head 2cead57

Please upload reports for the commit 2cead57 to get more accurate results.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8031   +/-   ##
=======================================
  Coverage   87.93%   87.93%           
=======================================
  Files         403      403           
  Lines       13796    13796           
  Branches     4022     4022           
=======================================
  Hits        12131    12131           
  Misses       1358     1358           
  Partials      307      307           
Flag Coverage Δ
unittest 87.93% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


We recommend switching to `parserOptions.projectService` if possible.

## ⚡️ Performance Comparisons
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I don't forget: t3-oss/create-t3-app#1936 (comment) is an example of a perf improvement in the wild.

@JoshuaKGoldberg JoshuaKGoldberg removed this from the 8.0.0 milestone Jul 28, 2024
@JoshuaKGoldberg JoshuaKGoldberg changed the base branch from v8 to main July 31, 2024 17:06
@Zamiell
Copy link
Contributor

Zamiell commented Aug 12, 2024

Can you rebase this on main? It looks like the PR has 475 changed files, which doesn't seem to be right.

(Context: I'm trying to read the upcoming blog post to learn more about how exactly to configure my projectService setting.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes here are unintentional merge artifacts. Will revert.

@JoshuaKGoldberg JoshuaKGoldberg removed blocked by another PR PRs which are ready to go but waiting on another PR blocked by external API Blocked by a tool we depend on exposing an API, such as TypeScript's Type Relationship API blocked by another issue Issues which are not ready because another issue needs to be resolved first labels Aug 14, 2024
- ESLint's `--fix` mode breaks type information after the first run ([#9577](https://github.com/typescript-eslint/typescript-eslint/pull/9577))
- Extra file extensions, such as those used by `.svelte` and `.vue`, are not supported ([#9504](https://github.com/typescript-eslint/typescript-eslint/issues/9504))

typescript-eslint's single-run inference enables uses common heuristics such as checking for `'--fix'` in `process.argv`, the presence of `process.env.CI`, and the presence of `parserOptions.extraFileExtensions`.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: typo, I made a guess at the intended wording:

Suggested change
typescript-eslint's single-run inference enables uses common heuristics such as checking for `'--fix'` in `process.argv`, the presence of `process.env.CI`, and the presence of `parserOptions.extraFileExtensions`.
typescript-eslint's single-run inference uses common heuristics such as checking for `'--fix'` in `process.argv`, the presence of `process.env.CI`, and the presence of `parserOptions.extraFileExtensions`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: Add blog post & revamped docs for parserOptions.projectService
7 participants