SimenB / stylint

Improve your Stylus code with Stylint
https://simenb.github.io/stylint/
GNU General Public License v2.0
348 stars 62 forks source link

Warning on sorting properties without reason #414

Open MatBdry opened 7 years ago

MatBdry commented 7 years ago

I got the declaration:

.popper {
    z-index: 110;
    border-radius: 5px;
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.15);
    background: white;
    fill: $grey4;
    padding: 4px 0;
    min-width: 100px;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
    color: $grey4;
    font-size: 10px; -> line 40
}

And the lint trigger a warning while I have this sort order description in my .stylintrc:

40 sortOrder warning prefer custom grouped when sorting properties

"sortOrder": [ "box-sizing", "display", "position", "top", "right", "bottom", "left", "float", "clear", "align-content", "align-items", "align-self", "flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow", "flex-shrink", "flex-wrap", "justify-content", "order", "columns", "column-gap", "column-fill", "column-rule", "column-rule-width", "column-rule-style", "column-rule-color", "column-span", "column-count", "column-width", "backface-visibility", "perspective", "perspective-origin" , "transform", "transform-origin", "transform-style", "transition", "transition-delay", "transition-duration", "transition-property", "transition-timing-function", "visibility", "opacity", "z-index", "margin", "margin-top", "margin-right", "margin-bottom", "margin-left", "outline", "outline-offset", "outline-width", "outline-style", "outline-color", "border", "border-top", "border-right", "border-bottom", "border-left", "border-width", "border-top-width", "border-right-width", "border-bottom-width", "border-left-width", "border-style", "border-top-style", "border-right-style", "border-bottom-style", "border-left-style", "border-radius", "border-top-left-radius", "border-top-right-radius", "border-bottom-left-radius", "border-bottom-right-radius", "border-color", "border-top-color", "border-right-color", "border-bottom-color", "border-left-color", "border-image", "border-image-source", "border-image-width", "border-image-outset", "border-image-repeat", "border-image-slice", "box-shadow", "background", "background-attachment", "background-clip", "background-color", "background-image", "background-origin", "background-position", "background-repeat", "background-size", "cursor", "padding", "padding-top", "padding-right", "padding-bottom", "padding-left", "width", "min-width", "max-width", "height", "min-height", "max-height", "overflow", "overflow-x", "overflow-y", "resize", "list-style", "list-style-type", "list-style-position", "list-style-image", "caption-side", "table-layout", "border-collapse", "border-spacing", "empty-cells", "animation" , "animation-name", "animation-duration", "animation-timing-function", "animation-delay", "animation-iteration-count", "animation-direction", "animation-fill-mode", "animation-play-state", "vertical-align", "direction", "tab-size", "text-align", "text-align-last", "text-justify", "text-indent", "text-transform", "text-decoration", "text-decoration-color", "text-decoration-line", "text-decoration-style", "text-rendering", "text-shadow", "text-overflow", "line-height", "word-spacing", "letter-spacing", "white-space", "word-break" , "word-wrap", "color", "font", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-weight", "font-smoothing", "osx-font-smoothing", "font-variant", "font-style", "content", "quotes", "counter-reset", "counter-increment", "page-break-before", "page-break-after", "page-break-inside", "filter", "pointer-events" ]

The order seems correct...

anttimo commented 5 years ago

This is an old issue but I was getting a list of 51 warnings in our clean master branch where others didn't get any. It turns out if I change the node version the warnings go away. So in node v11.12.0 I was getting the warnings but not in v9.1.0. One of the cases where newer node gives a warning and the older doesn't was with a property that isn't the in ordering.json: animation-fill-mode.