eslint-plugin-no-lookahead-lookbehind-regexp icon indicating copy to clipboard operation
eslint-plugin-no-lookahead-lookbehind-regexp copied to clipboard

Extend rule to look into Template Literal and BinaryExpressions

Open RatoX opened this issue 1 year ago • 1 comments

Fixes https://github.com/JonasBa/eslint-plugin-no-lookahead-lookbehind-regexp/issues/7


This Pull Request is improving the lint rule to check more edge cases, like:

new RegExp("(?<=)" + "");
new RegExp(`(?<=)`);

However, it still doesn't cover this kind of scenario:

const foo = "(?<=)";
new RegExp(`some content ${foo}`);

That would require a little bit of more code.

RatoX avatar Jul 12 '23 01:07 RatoX