sindresorhus/eslint-plugin-unicorn



The issue has been solved
The `regex-shorthand` rule has a false-negative #157
sindresorhus posted onGitHub
This doesn't cause a lint error:
const foo = /^by @([a-zA-Z0-9-]+)/
Even though it could be:
const foo = /^by @([a-zA-Z\d-]+)/
I think we might need to use some more advanced detection. Maybe regexp-tree
. Although, it has an optimizer API already, which I think already handles this and many other cases.
// @SamVerschueren
Fund this Issue
Rewarded pull request
update to use for regex literals #437submitted byjdanil(33)
Other pull requests
Click to copy link
Recent activities