Skip to content

refactor: migrate eslint resolver-oxc to resolver-typescript #3030

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JounQin
Copy link

@JounQin JounQin commented Apr 24, 2025

Proposed changes

As title

Related issues

extracted from #2939

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality
  • For bug fix -> I implemented a test that covers the bug

Further comments

Just quote from other PRs: SocketDev/socket-cli#386 (comment)

cc @savacano28 @RomuDeuxfois

@@ -1,3 +1,4 @@
// eslint-disable-next-line import/no-named-as-default -- named `Immutable` is a `type`
Copy link
Author

@JounQin JounQin Apr 24, 2025

Choose a reason for hiding this comment

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

This is an issue from eslint-plugin-import, see also un-ts/eslint-plugin-import-x#312

I'll fix it in eslint-plugin-import-x, but it's also fine to keep using eslint-plugin-import with this disable comment.

Then why there is no such issue when using resolver-oxc? Because resolver-typescript prefers .d.ts over .js which enables the possibility to recognize type from the import statement, import { Immutable } from 'seamless-immutable' without import type { Immutable } or import { type Immutable }, eslint-plugin-import will reports import/named error because named Immutable export doesn't exist in the .js source, only available in the .d.ts declaration.

Copy link

codecov bot commented Apr 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 40.47%. Comparing base (1bd9fc1) to head (b0ab2d5).

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #3030   +/-   ##
=========================================
  Coverage     40.47%   40.47%           
  Complexity     2084     2084           
=========================================
  Files           642      642           
  Lines         19601    19601           
  Branches       1330     1330           
=========================================
  Hits           7933     7933           
  Misses        11235    11235           
  Partials        433      433           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant