Closed loynoir closed 1 year ago
1.7.1
Node version: npm version: Local ESLint version: 8.40.0 Global ESLint version: Operating System:
@typescript-eslint/parser
const foobar = 'foobar' const reproduce = new RegExp(`some_other_pattern_${escapeStringRegexp(foobar)}_some_other_pattern`) void reproduce
By default, ignore escapeStringRegexp() https://www.npmjs.com/package/escape-string-regexp
escapeStringRegexp()
Or add options,
"security/detect-non-literal-regexp": [ "warn", { "escaper": [ "escapeStringRegexp" ] } ],
Linter warning
No response
I'm sorry, this is too specific of an exception to add as a general option for this rule. You're better off using a disable comment for this.
What version of eslint-plugin-security are you using?
1.7.1
ESLint Environment
Node version: npm version: Local ESLint version: 8.40.0 Global ESLint version: Operating System:
What parser are you using?
@typescript-eslint/parser
What did you do?
Configuration
``` ```What did you expect to happen?
By default, ignore
escapeStringRegexp()
https://www.npmjs.com/package/escape-string-regexpOr add options,
What actually happened?
Linter warning
Participation
Additional comments
No response