-
-
Notifications
You must be signed in to change notification settings - Fork 928
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
[#2829] add autofix for fix-shorthand-property-no-redundant-values #2956
[#2829] add autofix for fix-shorthand-property-no-redundant-values #2956
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.
Looks good, except few small things:
- Please, add
fix: true
for alltestRule
to be sure, we don't break style sheets unintentionally. - Add "(Autofixable)" for this rule in the rules list.
result, | ||
ruleName | ||
}); | ||
if (context.fix) { |
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.
Could you add an empty line before if
for better readability, please?
@@ -18,6 +18,8 @@ This rule alerts you when you use redundant values in the following shorthand pr | |||
- `border-width` | |||
- `grid-gap` | |||
|
|||
The `--fix` option on the [command line](../../../docs/user-guide/cli.md#autofixing-errors) can automatically fix some of the problems reported by this rule. |
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.
can automatically fix some of the problems reported by this rule
Looks like it could fix all problems.
ok - addressed all the feedback. |
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.
Please, remove unrelated changes. Everything else looks good.
docs/user-guide/rules.md
Outdated
|
||
#### String | ||
|
||
- [`string-quotes`](../../lib/rules/string-quotes/README.md): Specify single or double quotes around strings. | ||
|
||
#### Length | ||
|
||
- [`length-zero-no-unit`](../../lib/rules/length-zero-no-unit/README.md): Disallow units for zero lengths. | ||
- [`length-zero-no-unit`](../../lib/rules/length-zero-no-unit/README.md): Disallow units for zero lengths (Autofixable). |
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.
Not related to this PR. Addressed in #2957.
docs/user-guide/rules.md
Outdated
- [`number-leading-zero`](../../lib/rules/number-leading-zero/README.md): Require or disallow a leading zero for fractional numbers less than 1. | ||
- [`number-no-trailing-zeros`](../../lib/rules/number-no-trailing-zeros/README.md): Disallow trailing zeros in numbers. | ||
- [`number-leading-zero`](../../lib/rules/number-leading-zero/README.md): Require or disallow a leading zero for fractional numbers less than 1 (Autofixable). | ||
- [`number-no-trailing-zeros`](../../lib/rules/number-no-trailing-zeros/README.md): Disallow trailing zeros in numbers (Autofixable). |
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.
Not related to this PR. Addressed in #2957.
should be good now? |
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!
@modosc Don't violate this rule! |
sorry about that. |
Retro-active review: Code LGTM! @modosc Thanks for adding the changelog item. Please remember to respect the conventions in the guide:
And then posting the changelog item into the thread. I've tweak it to:
|
@hudochenkov @jeddy3 thanks for bearing with me - i opened #2960 to clarify the approval process a bit. |
No worries at all. Many thanks for your continued work on stylelint. You've been nailing the autofix stuff recently :) |
#2829
No, it's self explanatory