Skip to content

Support RegExp in ignore option of no-unresolved #3087

Open
@regseb

Description

@regseb

An array of RegExp pattern strings must be set to the ignore option of the import/no-unresolved rule. With a string, linters (and text editors) don't know that it contains a regex and can't check it.

It would be simpler and safer if we could set the RegExp directly:

export default [{
  rules: {
    "import/no-unresolved": ["error", { ignore: [/\.img$/v] }],
  }
]};

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