-
-
Notifications
You must be signed in to change notification settings - Fork 942
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 selector-attribute-name-disallowed-list #4992
Add selector-attribute-name-disallowed-list #4992
Conversation
I'll try to fix linting and test errors. |
…rletsin/stylelint into selector-attribute-name-disallowed-list
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.
@rletsin Thanks. It's looks great so far!
In my original proposal, I should have said use both the:
rules as a blueprints; taking the AST traversal from selector-attribute-operator-disallowed-list
and the options from media-feature-name-disallowed-list
. As this rule targets names, rather than operators, it'll need to accept regexes like the media-feature-name-disallowed-list
rule does.
Can you update the options, docs and tests so they are more aligned with media-feature-name-disallowed-list
rule, please?
docs/user-guide/rules/list.md
Outdated
@@ -173,6 +173,7 @@ Grouped first by the following categories and then by the [_thing_](http://apps. | |||
- [`selector-attribute-operator-blacklist`](../../../lib/rules/selector-attribute-operator-blacklist/README.md): Specify a list of disallowed attribute operators. **(deprecated)** | |||
- [`selector-attribute-operator-disallowed-list`](../../../lib/rules/selector-attribute-operator-disallowed-list/README.md): Specify a list of disallowed attribute operators. | |||
- [`selector-attribute-operator-whitelist`](../../../lib/rules/selector-attribute-operator-whitelist/README.md): Specify a list of allowed attribute operators. **(deprecated)** | |||
- [`selector-attribute-name-disallowed-list`](../../../lib/rules/selector-attribute-name-disallowed-list/README.md): Specify a list of disallowed attribute names. |
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 order this alphabetically, i.e. put it before the operator
rules.
lib/rules/index.js
Outdated
@@ -274,6 +274,9 @@ const rules = { | |||
'selector-attribute-operator-whitelist': importLazy(() => | |||
require('./selector-attribute-operator-whitelist'), | |||
)(), | |||
'selector-attribute-name-disallowed-list': importLazy(() => |
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 order this alphabetically, i.e. put it before the operator
rules.
@jeddy3 Thanks for your suggestions! |
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!
Looks good to me.
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.
Looks nice! 👏
Changelog:
|
Solution for Issue #4915
I think no, it's self-explanatory.