Skip to content

Add eslint-plugin-unicorn #133

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

Merged
merged 1 commit into from
Jun 17, 2021

Conversation

bmish
Copy link
Member

@bmish bmish commented Jun 16, 2021

All sorts of cool rules for enforcing/converting to better, modern JavaScript code.

Most of this was autofixed. I disabled a few noisy/undesirable rules.

https://github.com/sindresorhus/eslint-plugin-unicorn

@@ -57,7 +57,7 @@ module.exports = {
) {
const message = reportInfo.message.value || messageStaticValue.value;
// https://github.com/eslint/eslint/blob/2874d75ed8decf363006db25aac2d5f8991bd969/lib/linter.js#L986
const PLACEHOLDER_MATCHER = /\{\{\s*([^{}]+?)\s*\}\}/g;
const PLACEHOLDER_MATCHER = /{{\s*([^{}]+?)\s*}}/g;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a false negative of the rule no-useless-escape?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it, unicorn/better-regex applies a few more plugins to cleanup the regexp.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you file the issue in eslint repo, to make sure we don't lost track of it? thanks!

@bmish bmish force-pushed the eslint-plugin-unicorn branch 2 times, most recently from 54071e2 to d0c06c9 Compare June 17, 2021 15:25
@bmish bmish force-pushed the eslint-plugin-unicorn branch from d0c06c9 to 5fbb15b Compare June 17, 2021 15:25
Copy link
Contributor

@aladdin-add aladdin-add left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! 💯

@aladdin-add aladdin-add merged commit d71c8b3 into eslint-community:master Jun 17, 2021
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

Successfully merging this pull request may close these issues.

2 participants