Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Join forces with eslint-plugin-unicorn #59

Closed
EvgenyOrekhov opened this issue Dec 20, 2019 · 2 comments
Closed

Join forces with eslint-plugin-unicorn #59

EvgenyOrekhov opened this issue Dec 20, 2019 · 2 comments

Comments

@EvgenyOrekhov
Copy link

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?

@brettz9
Copy link
Contributor

brettz9 commented Mar 2, 2020

@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.)

@BrainMaestro
Copy link
Owner

I think it's fine to have this separate, and since it still has users, I will close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants