Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[utils] [fix] parse: Also delete parserOptions.projectService #3039

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

Merged
merged 1 commit into from
Aug 25, 2024

Conversation

Mysak0CZ
Copy link
Contributor

Recently typescript-eslint released version 8. One of the breaking changes introduced there was renaming EXPERIMENTAL_useProjectService to projectService.
xref: https://typescript-eslint.io/blog/announcing-typescript-eslint-v8-beta/#project-service

This fix deletes the new property as well to let this plugin be compatible with v8. During my testing I didn't encounter any other issues than this.

Change is based on prior change to get project service option working:
ref #2963

Copy link

codecov bot commented Aug 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.74%. Comparing base (09476d7) to head (d3f3b92).

❗ There is a different number of reports uploaded between BASE (09476d7) and HEAD (d3f3b92). Click for more details.

HEAD has 23 uploads less than BASE
Flag BASE (09476d7) HEAD (d3f3b92)
32 9
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3039       +/-   ##
===========================================
- Coverage   96.02%   81.74%   -14.29%     
===========================================
  Files          78       86        +8     
  Lines        3299     3839      +540     
  Branches     1160     1266      +106     
===========================================
- Hits         3168     3138       -30     
- Misses        131      701      +570     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ljharb
Copy link
Member

ljharb commented Aug 23, 2024

The change is simple, but we're not testing on v6 of that parser, let alone v8 yet. I think we need to add those tests first.

(related, jsx-eslint/eslint-plugin-react#3629)

@Mysak0CZ
Copy link
Contributor Author

Mysak0CZ commented Aug 24, 2024

Hi @ljharb !
Do I understand correctly, that you accepted change for getting compatible with v6, which you don't test against, but don't want this plugin to be compatible with full release of v8, even if this is all that is needed, without more tests?

@ljharb
Copy link
Member

ljharb commented Aug 24, 2024

What v6 changes did i accept without testing in v6?

@Mysak0CZ
Copy link
Contributor Author

What v6 changes did i accept without testing in v6?

The PR I mentioned (#2963) is the exact same as this one - it adds support for projectservice, which was introduced in v6 of ts-eslint by deleting a new property named EXPERIMENTAL_useProjectService. This PR does the exact same, only for the new name that property got in v8.
As dev dependencies in package.json define only parser up to major version 5, the EXPERIMENTAL_useProjectService was definitely not tested as in version 5 it doesn't exist.

@ljharb
Copy link
Member

ljharb commented Aug 25, 2024

Fair point, I’ll stick to that precedent here then. cc @JoshuaKGoldberg @bmish to confirm this is all that’s needed?

Copy link
Contributor

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Yup, that's correct 👍

@ljharb ljharb added the package: utils eslint-module-utils package label Aug 25, 2024
@ljharb ljharb changed the title fix: Also delete parserOptions.projectService [utils] [fix] parse: Also delete parserOptions.projectService Aug 25, 2024
@ljharb ljharb merged commit c387276 into import-js:main Aug 25, 2024
309 checks passed
@ljharb
Copy link
Member

ljharb commented Aug 25, 2024

eslint-module-utils v2.8.2 is now published, with this change.

@Mysak0CZ Mysak0CZ deleted the fix/ts-eslint-8 branch August 26, 2024 15:20
alexey-koran added a commit to alexey-koran/eslint-config that referenced this pull request Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: utils eslint-module-utils package typescript
Development

Successfully merging this pull request may close these issues.

3 participants