Skip to content

tools: add eslint-plugin-regexp - #62093

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

tools: add eslint-plugin-regexp#62093
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
JLHwung:add-eslint-plugin-regexp

Conversation

@JLHwung

@JLHwung JLHwung commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

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
Comment thread eslint.config.mjs
'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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@aduh95 aduh95 left a comment

Copy link
Copy Markdown
Contributor

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 with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. labels Mar 18, 2026
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Mar 18, 2026
@nodejs-github-bot
nodejs-github-bot merged commit bd8522a into nodejs:main Mar 18, 2026
23 checks passed