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
Fixed: ignore variables with signs in value-keyword-case
.
#2558
Conversation
lib/utils/isStandardSyntaxValue.js
Outdated
@@ -6,18 +6,26 @@ const hasInterpolation = require("../utils/hasInterpolation") | |||
* Check whether a value is standard | |||
*/ | |||
module.exports = function (value/*: string*/)/*: boolean*/ { | |||
let normalizedValue = value | |||
|
|||
// Ignore signs before variable (example `-$variable`) |
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.
Maybe Ignore operators before variables (example -$variable)
instead of signs
?
lib/utils/isStandardSyntaxValue.js
Outdated
let normalizedValue = value | ||
|
||
// Ignore signs before variable (example `-$variable`) | ||
// Sings `*` and `/` should be removed after resolve this issue in `postcss-value-parser` |
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.
Spelling Signs
, not Sings
, or Operators
based on comment above
72257f2
to
f460477
Compare
/cc @ntwb |
lib/utils/isStandardSyntaxValue.js
Outdated
let normalizedValue = value | ||
|
||
// Ignore operators before variables (example -$variable) | ||
if (value[0] === "-" || value[0] === "+" || value[0] === "*" || value[0] === "/") { |
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.
A regular expression makes more sense here, I think. Something like /^[-+\*\/]/
.
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.
You don't even need to escape, if I'm not mistaken: /^[-+*/]/
.
@evilebottnawi Am I right in thinking this PR supersedes #2438? |
@jeddy3 yep, we can close this issue |
LGTM after David's request is addressed: https://github.com/stylelint/stylelint/pull/2558/files#r116360039 |
f460477
to
68bbd46
Compare
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
Changelog:
|
#2404
No, it's self explanatory.