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 rule-selector-property-disallowed-list rule #5489
Add rule-selector-property-disallowed-list rule #5489
Conversation
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 for creating the PR! 👏🏼
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! 👏🏼
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 for continuing to work on this pull request.
I've requested some changes to:
- align with our conventions
- test multi-value behaviour
lib/rules/rule-selector-property-disallowed-list/__tests__/index.js
Outdated
Show resolved
Hide resolved
line: 1, | ||
column: 19, | ||
}, | ||
], |
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.
Let's add a reject test for two violations, e.g.
code: 'a { color: red; margin-top: 0px; }',
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.
@jeddy3 Thank you for your review. Updated the tests as you suggested.
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
…ex.js Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
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 for making the changes. It's looking good.
I've one last request. Let's add a reject test for:
code: 'a { color: red; margin-top: 0px; }',
It should report two problems. We'll need to use the warnings
property. Something like:
{
code: "a { color: red; margin-top: 0px; }"
warnings: [
{ message: messages.rejected('color', 'a'), line: 1, column: 5 },
{ message: messages.rejected('margin-top', 'a'), line: 1, column: 17 },
],
}
The new rule
rule-selector-property-disallowed-list
that is mentioned in #5433 has been added.e.g. "No, it's self-explanatory."