-
-
Notifications
You must be signed in to change notification settings - Fork 946
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 negatives for SVG keywords and add option: ["camelCaseSvgKeywords"] to value-keyword-case #5849
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kawaguchi1102 Thanks for creating the pull request!
[ask] @jeddy3 said on #4884 (comment):
We change the default behaviour so that the primary option (
lower
orupper
) is used for every keyword, and add acamelCaseSvgKeywords: true
option for users who want the existing behaviour.
so, when camelCaseSvgKeywords: false
(this is the changed default behavior?), should currentcolor
be always correct, not currentColor
?
That's correct. This pull request should also fix the false negatives, i.e. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kawaguchi1102 Thanks for the pull request.
As @ybiquitous implied, the logic needs inverting i.e. when the camelCaseSvgKeywords
option is set to true
the SVG keywords should be camel case regardless of the primary option. When the it is set to false
or not set, then the primary option, e.g. lower
or upper
, should be respected.
Thank you for pointing out the mistake. I will fix this issue. |
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out the SVG keywords were only camelCase for the "lower"
primary. I've aligned this new option with that, as well as patching up the logic and tests.
If
true
, this rule expects SVG keywords to be camel case when the primary option is"lower"
.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM👍
Closes #4884
Following the discussion in the issue thread, I have added a rule option.
I hope this will satisfy your request.