-
-
Notifications
You must be signed in to change notification settings - Fork 929
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 link to stylelint-selector-tag-no-without-class plugin #3201
Conversation
Congratulations on your first stylelint plugin! :) I took a quick look at it, and have one suggestion. I think it doesn't need a secondary option. Primary option could have an array. If array isn't empty, then the rule is enabled. You can take any |
Thanks for the suggestion. That option crossed my mind, but I was unsure whether an array as primary option would make sense when the rule would get (other) secondary options in the future (which I totally see happening). Would something like that be considered good practice? I couldn't find other examples of such situations, and the configuration looks a bit messy: "rule": [ ["tag1", "tag2", "tag3"], {
"someOtherOption": true
} ] |
It's ok. {
"unit-blacklist": [
["px", "em", "deg"],
{
"ignoreProperties": {
"px": ["font-size", "/^border/"]
}
}
]
} Also, every rule could have |
Thank you for your feedback. I will aim to release a version 2.0 with the tags as the primary option. It seems though that https://github.com/stylelint/stylelint-test-rule-tape does not work well with |
@aboks Could you create an issue in that repo documenting what happens and what you expect to happen with some links to or code examples please :) FYI: stylelint itself pretty much uses Jest for testing these days, so that is more than likely the reason we've not seen this issue before. |
This brings the rule more in line with Stylelint's similar `*-blacklist` plugins. Also, using standard functionality for such blacklists now allows the tags to be configured using regular expressions. Change suggested by @hudochenkov at stylelint/stylelint#3201 (comment)
None, this is a small documentation addition.
No, it's self explanatory.