-
-
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
Fix declaration-block-no-redundant-longhand-properties
autofix for transition
#6812
Comments
@jathak Thanks for the report with a reproducible demo. I confirm the incorrect behavior. Using {
"rules": {
"declaration-block-no-redundant-longhand-properties": [true, {"ignoreShorthands": ["transition"]}]
}
} However, we probably need to provide a custom resolver for the stylelint/lib/rules/declaration-block-no-redundant-longhand-properties/index.js Lines 28 to 50 in f7846cb
I've labeled the issue as ready to implement. Please consider contributing if you have time. There are steps on how to fix a bug in a rule in the Developer guide. |
declaration-block-no-redundant-longhand-properties
transition with multiple propertiesdeclaration-block-no-redundant-longhand-properties
autofix for transition
😓 sorry for the issue with this autofix (I initially contributed it). Have just submitted #6815 which should directly resolve the reported issue + better follow the CSS spec. |
Ah, also - one other approach to consider is that we could create a new |
What steps are needed to reproduce the bug?
Given code like:
What Stylelint configuration is needed to reproduce the bug?
How did you run Stylelint?
https://stylelint.io/demo/#N4Igxg9gJgpiBcICGACYAdAdilAXATkpgM4CWupEmAtLADZICe8KArAAzsC2xA3FjgJEyFKrQCuhUZhYAmDj37Y8hEuUo0KXUpgDm1AGbjMYaSxhJiMajuoRxuJYNUiN1AA74I7mPlzMVYQMIfC4AGhQAN1IyACNSOnJGJQBfEDCQAwSYADkkLjhEGAAPfPc6GAA6MGJidPAqLN0EEAxldBAS3BhMKGIOlgBtARwUDuJ-CsTMXGpITCbqCaIoJHwoDpGAXSw0jPmmgDEQriRcFoArYip62Hc6xDacccmYadwBsZAGbomOsJGL0YUx0swOpH0y16aw2CC+PxgfxAuxAKSAA
Which version of Stylelint are you using?
15.6.0
What did you expect to happen?
No problems to be reported, or, if a
declaration-block-no-redundant-longhand-properties
error is reported, the autofix should beWhat actually happened?
An error of
Expected shorthand property "transition"
with an incorrect suggested autofix of:Does the bug relate to non-standard syntax?
No
Proposal to fix the bug
IMO, this error shouldn't be reported at all for transitions with multiple properties (as reported in #4074), but if it is considered an error, then the autofix at least needs to be changed.
The text was updated successfully, but these errors were encountered: