ota-meshi / eslint-plugin-regexp

ESLint plugin for finding regex mistakes and style guide violations.
https://ota-meshi.github.io/eslint-plugin-regexp/
MIT License
701 stars 10 forks source link

Can we avoid multiple rules reporting errors for one regular expression? #756

Closed btea closed 4 months ago

btea commented 4 months ago

For example, the regular expression is /[^a-zA-Z0-9_$]/g, the following error message will appear after checking.

image

But in fact, as long as I modify it according to the first error prompt, there will be no problem with the following prompts, so I wonder if I can only display the first error message in this case.

ota-meshi commented 4 months ago

That is not possible, since it is impossible to know what each rule will report when processing it.

zloirock commented 4 months ago

I think that it makes sense to propose to ESLint core something like /* eslint-disable-plugin %PLUGIN_NAME% */ and next-line version.