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
Add no-irregular-whitespace #5209
Conversation
[question] In the blueprint #5201 (comment), this rule is proposed without secondary options, and I agree with the blueprint. |
I thought it would be a nice addition if we gave the users some control over which types of irregular whitespaces should be disallowed. I don't have have a practical example where it definitely could come handy unless if we consider it may be purposefully used in an attribute selector. a[title="some content with irregular whitespace"] Please let me know if I should remove it anyway. |
@itutto Thank you for the detailed description. I'm a bit worried if there is more complexity than needed... 🤔 For example, a case when both {
"rules": {
"no-irregular-whitespace": [
true, { "allow": ["\u0085"], "only": ["\u00A0"] }
]
}
} But I would like to know @jeddy3's opinion about this. |
@itutto Thank you for the pull request. It's looking good so far.
Yes, please remove the secondary options. We only them when there has been a specific user request for them. There are lots of rules in stylelint and so we try to minimise complexity where we can. |
- various updates based on pr review - refactored tests
Thank you both for the reviews. I've removed the secondary options and applied the other suggested changes as well. |
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.
@itutto Thanks for addressing reviews. It seems this PR is almost enough already, but I left some refactoring ideas.
It would be nice if you can check it. 😄
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 👍
Would you like to see any further changes, @jeddy3 ? |
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.
Thanks! LGTM.
Changelog entry added:
|
Implementation proposal for issue: 5201
This PR proposes an implementation for
no-irregular-whitespace
rule, which has been previously approved for implementation in the referenced issue.Closes #5201