Skip to content

tools: add eslint-plugin-regexp#62093

Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom
JLHwung:add-eslint-plugin-regexp
Mar 18, 2026
Merged

tools: add eslint-plugin-regexp#62093
nodejs-github-bot merged 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.

Copy link
Contributor

@aduh95 aduh95 left a comment

Choose a reason for hiding this comment

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

I don't see why not. There are conflicts to resolve though

@JLHwung JLHwung force-pushed the add-eslint-plugin-regexp branch from 06e5140 to 87076ee Compare March 18, 2026 03:37
@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. labels Mar 18, 2026
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 18, 2026
@nodejs-github-bot nodejs-github-bot merged commit bd8522a into nodejs:main Mar 18, 2026
23 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in bd8522a

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

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. tools Issues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants