-
-
Notifications
You must be signed in to change notification settings - Fork 938
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 no-unit-unknown
rule for variable usage
#4163
Conversation
I wonder why it wasn't catched by |
I have changed the way how this issue is fixed, i.e. use |
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.
Nice solution!
Could remove lint-stages changes, please? We squash commits on merge and this change would be confusing in unrelated commit.
Sure, I have removed lint-stages changes. Would you like me to send another PR for this lint-staged changes? Seems at least on my side, lint-staged won't work without changing the config in package.json. |
Yes, please :) |
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.
Thank you!
|
@@ -25,7 +25,7 @@ module.exports = function(node /*: Object*/) /*: ?string*/ { | |||
|
|||
if ( | |||
node.type !== "word" || | |||
!isStandardSyntaxValue(value) || | |||
!isStandardSyntaxValue(node.value) || |
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.
/cc @hudochenkov it is break other case, for example .selector { property: 20px\9; }
- regression
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.
But it's a hack for IE8.
All tests were passed.
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.
@hudochenkov yes, based on code test should be failed 😕 https://github.com/laysent/stylelint/blob/0c68261c43123df7e0ffaabbdc350a8a480fb43a/lib/utils/getUnitFromValueNode.js#L29, maybe postcss-value-parser recognize this as other type for node, i will look on this today
@hudochenkov Hi, just curious when would be the next release of stylelint? With this fixed, I could introduce the tool to our team and use it in our projects. ;-) |
Closes #4162
I noticed that lint-staged changed the way how it's configured. From their document, they encourage to use ignore configuration of each linter. And since this file is already in
.eslintignore
and.prettierignore
, I believe it's safe to remote corresponding line in lint-staged config.