Skip to content

no-duplicates rule with query-string params #1107

@pcorpet

Description

@pcorpet

I'm using the svg-transform-loader which transforms SVG files on the fly but then I end up importing a file several times but with different options a query string parameter:

import rocketIcon from 'images/rocket.svg'
import blackRocketIcon from 'images/rocket.svg?fill=#000'

eslint is not happy with that and raises a import/no-duplicates error.

Any idea how I should setup my config so that this plugin actually understands that even if they are based on the same file, it's a valid different import?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions