Skip to content

Rule Change: add suggestion to merge modifiers in no-duplicate-imports #598

Open

Description

@Tanujkanti4441

What rule do you want to change?

no-duplicate-imports

What change do you want to make?

Implement suggestions

How do you think the change should be implemented?

Other

Example code

@import url('a.css') print;
@import url('a.css') screen and (width > 800px);

What does the rule currently do for this code?

Right now the rule gives suggestion to remove one of the duplicate import, here both are having different modifiers.

What will the rule do after it's changed?

Rule will also give a suggestion to just merge the modifiers of both import into one.

Participation

  • I am willing to submit a pull request to implement this change.

AI acknowledgment

  • I did not use AI to generate this issue report.
  • (If the above is not checked) I have reviewed the AI-generated content before submitting.

Additional comments

No response

Activity

  1. added
    enhancement
    on Oct 24, 2026
  2. moved this from Needs Triage to Feedback Needed in Triageon Oct 25, 2026
  3. DMartens commented on Oct 25, 2026

    @DMartens
    Collaborator

    I agree that adding a suggestion for merging would be a wortwhile addition.
    In the case of duplicate conditions, I think it would be fine to still suggest a fix, e.g.:

    @import url('a.css') print;
    @import url('a.css') print and (width > 800px);
  4. Tanujkanti4441 commented on Nov 6, 2026

    @Tanujkanti4441
    ContributorAuthor

    Yes that is the intent here, to only provide the suggestion for merging when both duplicate imports contain one or more different conditions, not when one of the import contains all the conditions that another also has.

  5. eslint-github-bot commented on Nov 29, 2026

    @eslint-github-bot

    👋 Hi! This issue is being addressed in pull request #647. Thanks, @maslianok!

  6. maslianok commented on Nov 29, 2026

    @maslianok

    Hi @Tanujkanti4441, I saw this issue was assigned to you, but there were no updates here for 23 days, so I opened #647. Sorry for not asking first. If you don't have time to work on it, just let me know and #647 can be reopened. If you're still on it, no problem at all.

  7. DMartens commented on Nov 29, 2026

    @DMartens
    Collaborator

    @maslianok This issue is currently not accepted as we are currently waiting for opinions from other team members.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancement

Type

No type

Projects

  • Status
    Feedback Needed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions