Skip to content

tools: add eslint-plugin-regexp#62093

Open
JLHwung wants to merge 1 commit intonodejs:mainfrom
JLHwung:add-eslint-plugin-regexp
Open

tools: add eslint-plugin-regexp#62093
JLHwung wants to merge 1 commit intonodejs:mainfrom
JLHwung:add-eslint-plugin-regexp

Conversation

@JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Mar 3, 2026

In this PR we add eslint-plugin-regexp and its recommended rule set to the current lint rule. To seek consensus on whether we should use this plugin, we have disabled all rules which the current codebase does not meet, so there is no change in the current codebase. I plan to enable some of them in the near future if we agree to add this eslint plugin.

@nodejs-github-bot nodejs-github-bot added the tools Issues and PRs related to the tools directory. label Mar 3, 2026
'regexp/no-misleading-capturing-group': 'off',
'regexp/no-obscure-range': 'off',
'regexp/no-potentially-useless-backreference': 'off',
'regexp/no-super-linear-backtracking': 'off',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rule can prevent issues like #61904.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be error then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be error then?

Per PR description

To seek consensus on whether we should use this plugin, we have disabled all rules which the current codebase does not meet, so there is no change in the current codebase.

There are around 20 errors from this rule, to limit the scope of this PR, I suggest we discuss whether we should add this eslint plugin. If there is a consensus to add it, then we can always open a new PR to enable rules and fix linting errors.

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

Labels

tools Issues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants