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

Linter: Combine Imports #701

Merged
merged 2 commits into from
Mar 6, 2024
Merged

Linter: Combine Imports #701

merged 2 commits into from
Mar 6, 2024

Conversation

Ellpeck
Copy link
Member

@Ellpeck Ellpeck commented Mar 6, 2024

So, all of the options for this rule kind of suck, so we have to compromise.

  • the eslint rule doesn't allow auto-fixing, making fixing hundreds of source files a bit of a pain.
  • The import/no-duplicates rule, which we're using now, is fine. However, we'd like to enable the prefer-inline option as well, to allow for type imports and regular imports to be merged. Unfortunately, that behavior is currently broken, so we're not enabling it for now.

It seems like, for the time being, this is the best we can do.

@Ellpeck Ellpeck linked an issue Mar 6, 2024 that may be closed by this pull request
@Ellpeck Ellpeck requested a review from EagleoutIce March 6, 2024 11:40
@Ellpeck Ellpeck marked this pull request as draft March 6, 2024 11:42
@Ellpeck Ellpeck marked this pull request as ready for review March 6, 2024 11:44
Copy link

codecov bot commented Mar 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.13%. Comparing base (3cc5277) to head (791f02a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #701      +/-   ##
==========================================
- Coverage   71.19%   71.13%   -0.07%     
==========================================
  Files         217      217              
  Lines        7047     7032      -15     
  Branches     1095     1095              
==========================================
- Hits         5017     5002      -15     
  Misses       1738     1738              
  Partials      292      292              

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

@EagleoutIce
Copy link
Member

Thank you!

Unfortunately, that behavior import-js/eslint-plugin-import#2792, so we're not enabling it for now.

Can you create an issue for this?

@EagleoutIce EagleoutIce merged commit 8551528 into main Mar 6, 2024
21 checks passed
@EagleoutIce EagleoutIce deleted the 687-linter-combine-imports branch March 6, 2024 12:37
@EagleoutIce
Copy link
Member

This pull request is included in v1.4.2 (see Release v1.4.2 (Dropping xmlparsedata, Benchmark Re-Runs, and Repl Fixes)).

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.

Linter: Combine Imports
2 participants