-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
documentationDocumentation ("docs") that needs adding/updatingDocumentation ("docs") that needs adding/updatingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
Repro
{
"rules": {
"@typescript-eslint/prefer-regexp-exec": "error"
}
}
'foo'.match(/oo/)
Expected Result
It should not report any error.
Actual Result
It claims that Regexp.exec()
is preferred.
Additional Info
The rule was requested in #283.
The rule itself looks wrong. The documentation has a link to Stack Overflow, with a quote I couldn't find in this answer. Actually the word "fast" doesn't appear in this page at all.
Performance tests from several other questions don't show any significant improvements for one over the other.
It's unclear where the impression of performance difference came from.
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
3.6.0 |
@typescript-eslint/parser |
3.6.0 |
TypeScript |
3.9.6 |
ESLint |
7.4.0 |
node |
12.18.0 |
npm |
6.14.5 |
Metadata
Metadata
Assignees
Labels
documentationDocumentation ("docs") that needs adding/updatingDocumentation ("docs") that needs adding/updatingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin