-
Notifications
You must be signed in to change notification settings - Fork 336
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
Review the rule differences from switching to stylelint #1897
Comments
Ok to leave as-isRules I’m tempted to leave the way Kevin has implemented them. border-zero no-important class-name-format Potential changesRules we could potentially change (either specifically for GOVUK Frontend or as suggested changes to stylelint-config-gds). no-color-literalsThere is no equivalent in stylelint, but we can use available rules to get some of that functionality. Kevin’s PR already handles the following:
We could add You can preview the change here bem_depthThere isn’t an equivalent in stylelint. A plugin does exist, but it doesn’t seem to do exactly what we need. Kevin’s PR already handles the following:
It’s possible we could expand the You can preview the change here |
Would this prevent us from using them in variable declarations? I think I'd be tempted to leave this change out. The intent of // Invalid
.foo {
color: #ff0000; ❌
}
// Valid
$foo-text-color: #ff0000;
.foo {
color: $foo-text-color; ✅
} Blanket disallowing HSL / HSLA colours doesn't do the same thing, and whilst we might not use them at the minute I don't think it's something we need to enforce with linting rules.
A little confused about this one as the current |
Yes, it would. I think because we're not using
Good point, I think I got muddled there 🤦♀️ So I think we're ok with the nesting depth rule that's already been added in the PR and we don't want to enforce BEM depth? The regex could be adapted to disallow the rule you mention, but I guess if we're not enforcing it at the moment it makes sense to leave as-is for now and maybe revisit later? |
It's a shame that we can't replicate what |
@hannalaakso @36degrees Thanks both - I'm going to revert the WIP commits on Kevin's PR as we've decided they're not needed. There's also this PR that needs to be merged in and then Kevin's PR rebased to get the errors on use of |
Part of #1740
What
When Kevin raised the PR to switch to stylelint, he pointed out 5 rules which don't quite match up compared to what we currently have using sass-lint:
We should review these differences and check that we're happy with the new implementation. Where something hasn't been implemented, we need to decide whether that particular rule is important to us and, if it is, see if there's an alternative solution.
Why
There are some differences between sass-lint and stylelint - we need to check that switching doesn't bring any unexpected changes that we aren't comfortable with.
The text was updated successfully, but these errors were encountered: