[prefer-regexp-exec] The rule seems to be wrong #2280
Labels
documentation
Documentation ("docs") that needs adding/updating
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Repro
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
@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
The text was updated successfully, but these errors were encountered: