You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
eslint-plugin-unicorn also has another rule that works with regexes: no-unsafe-regex.
As an ESLint user I'd rather have one plugin with multiple rules than many plugins that each have one rule.
So maybe you could join forces with eslint-plugin-unicorn and improve its regex-shorthand rule if you can, and then deprecate eslint-plugin-optimize-regex?
The text was updated successfully, but these errors were encountered:
@EvgenyOrekhov While I find unicorn to be a great library, with the mix-and-match capability of eslint configs, I personally think there is place for a separate plugin with some who may prefer the ability to only pick a rule they need.
Although I don't think the current plugin offers anything essentially different than Unicorn's better-regex rule in unicorn at present (and Unicorn also parses new RegExp() strings), my PR #60 here would allow one advantage over Unicorn of being able to whitelist or blacklist the underlying regexp-tree options. (Feel free to file an issue with Unicorn and ping me there so I can hopefully find time to file a PR if there is interest in adding this feature.)
eslint-plugin-unicorn has the regex-shorthand rule, which, according to sindresorhus/eslint-plugin-unicorn#473, has some advantages over eslint-plugin-optimize-regex.
eslint-plugin-unicorn also has another rule that works with regexes: no-unsafe-regex.
As an ESLint user I'd rather have one plugin with multiple rules than many plugins that each have one rule.
So maybe you could join forces with eslint-plugin-unicorn and improve its regex-shorthand rule if you can, and then deprecate eslint-plugin-optimize-regex?
The text was updated successfully, but these errors were encountered: