-
Notifications
You must be signed in to change notification settings - Fork 1k
Replace deprecated sass-lint for stylelint #12774
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
Conversation
Signed-off-by: Mike Fiedler <[email protected]>
Trying to match the existing `.sass-lint.yml` rules as much as we can. Signed-off-by: Mike Fiedler <[email protected]>
Fixed based on the stylelint rules. There's 65 remaining fixes if we choose to change enable: - at-rule-empty-line-before - declaration-empty-line-before Signed-off-by: Mike Fiedler <[email protected]>
With `selector-pseudo-element-colon-notation` enabled, we double-colon pseudo selectors for visual specificity. Signed-off-by: Mike Fiedler <[email protected]>
Signed-off-by: Mike Fiedler <[email protected]>
Refs: https://stylelint.io/user-guide/rules/shorthand-property-no-redundant-values/ Signed-off-by: Mike Fiedler <[email protected]>
Refs: https://stylelint.io/user-guide/rules/selector-not-notation/ Signed-off-by: Mike Fiedler <[email protected]>
Solves: - alpha-value-notation: 5 - color-function-notation: 5 - color-hex-case: 3 - color-hex-length: 1 Signed-off-by: Mike Fiedler <[email protected]>
- declaration-block-trailing-semicolon: 2 - font-family-name-quotes: 1 - length-zero-no-unit: 1 - number-leading-zero: 1 - property-no-vendor-prefix: 1 - value-keyword-case: 1 Signed-off-by: Mike Fiedler <[email protected]>
Introduced in pypi#3397 Raises lint error for `no-duplicate-selectors`. - Remove duplication - Disable lint rule for the Pygments block, since it helps us visually organize our thoughts. Signed-off-by: Mike Fiedler <[email protected]>
Instead of trying to decipher in the future how I came up with the selector pattern, use a plugin that implements the right selector syntaxes. We disable the inherited `selector-class-pattern` rule from `stylelint-config-standard`. Refs: stylelint/stylelint-config-standard#209 Signed-off-by: Mike Fiedler <[email protected]>
Signed-off-by: Mike Fiedler <[email protected]>
Signed-off-by: Mike Fiedler <[email protected]>
@@ -183,7 +183,7 @@ | |||
} | |||
|
|||
@media only screen and (max-width: $tablet) { | |||
margin: 25px 10px 10px 10px; | |||
margin: 25px 10px 10px; |
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.
kinda gross that the new once prefers this way less obvious three value version just cause r/l are same margin, but OK
@@ -55,16 +55,6 @@ | |||
|
|||
// Remove top margin on elements at the top of the description | |||
> div:first-child > *:first-child, | |||
> *:first-child, |
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.
I do not understand this... do we know why it was repeated before?
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.
Originated during this change: a5be8a7
$dark-blue: darken($primary-color, 10); | ||
$darkest-blue: darken($primary-color, 20); | ||
$green: darken($success-color, 5); | ||
$light-green: $success-color; | ||
$red: $danger-color; | ||
$dark-red: darken($danger-color, 20); | ||
$purple: #bb0066; | ||
$orange: #A36200; | ||
$purple: #b06; |
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.
is there a rule to prefer "long" hex codes? this seems unnecessarily golfy.
sass-lint has been deprecated since 2017, here's what's on their README:
I appreciate they are trying to get their message across. Out with the old, in with the new!
Stylelint started in 2014, and has become a common utility for Sass authors.
The resulting config rules is an attempt to preserve current structure and minimize changes,
See commits for specific changes to make review easier.
Resolves some open vulnerability reports. Results in
npm audit
from:to:
Note: I attempted to also add the https://www.npmjs.com/package/stylelint-itcss package, but our ITCSS structure is not 100% standard, and raised a fair amount of linter issues on its own, so I'll leave that off for another time.