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

Fix false positives for WebExtension replacement keywords in value-keyword-case #4778

Merged
merged 1 commit into from May 16, 2020
Merged

Fix false positives for WebExtension replacement keywords in value-keyword-case #4778

merged 1 commit into from May 16, 2020

Conversation

mattxwang
Copy link
Member

@mattxwang mattxwang commented May 16, 2020

Hi there,

This is a PR that aims to address #4707, by adding a regex match to isStandardSyntaxValue that ignores values of the form /__MSG_[^\s]+__/, a set of runtime values often used by browsers for internationalization (more information here, as mentioned in the issue discussion). I also added two tests, one that checks for the positive, and one that checks for case-sensitivity.

As value-keyword-case uses isStandardSyntaxValue, this should resolve the false positive originally brought up in the issue.

Locally, this PR passes npm run format and npm run test.

Which issue, if any, is this issue related to?

Closes #4707.

Is there anything in the PR that needs further explanation?

Not on my end! Let me know if I should change the comments or add more tests.

@jeddy3 jeddy3 changed the title Ignore WebExtension Replacement Keywords in isStandardSyntaxValue Fix false positives for WebExtension replacement keywords in value-keyword-case May 16, 2020
Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

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

Thanks!

Looks good to me.

@jeddy3 jeddy3 mentioned this pull request May 16, 2020
6 tasks
Copy link
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@jeddy3 jeddy3 merged commit 4f8360b into stylelint:master May 16, 2020
@jeddy3
Copy link
Member

jeddy3 commented May 16, 2020

  • Fixed: value-keyword-case false positives WebExtension replacement keywords (#4778).

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

Successfully merging this pull request may close these issues.

Fix false positives for WebExtension replacement keywords in value-keyword-case
3 participants