Created
November 4, 2018 15:46
-
-
Save samuells/8915a1d32ac93f5c904893663f399218 to your computer and use it in GitHub Desktop.
Linting SCSS files with settings for orders in logical chunks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"extends": [ | |
"stylelint-config-standard", | |
"stylelint-config-sass-guidelines", | |
"./node_modules/prettier-stylelint/config.js" | |
], | |
"plugins": [ | |
"stylelint-scss", | |
"stylelint-order", | |
"stylelint-a11y", | |
"stylelint-declaration-block-no-ignored-properties" | |
], | |
"rules": { | |
"string-quotes": "double", | |
"no-empty-source": null, | |
"at-rule-no-unknown": null, | |
"property-no-unknown": [ | |
true, | |
{ | |
"ignoreProperties": [ | |
"user-drag" | |
] | |
} | |
], | |
"max-nesting-depth": 5, | |
"selector-max-compound-selectors": 5, | |
"selector-class-pattern": [ | |
"^[a-z0-9\\-\\_]+$", | |
{ | |
"message": "Selector should be written in lowercase with hyphens or underscores (selector-class-pattern)" | |
} | |
], | |
"selector-no-qualifying-type": null, | |
"unit-blacklist": [ | |
[ | |
"px" | |
], | |
{ | |
"ignoreProperties": { | |
"px": [ | |
"clip-path", | |
"letter-spacing", | |
"/^border/" | |
] | |
} | |
} | |
], | |
"no-descending-specificity": null, | |
"a11y/media-prefers-reduced-motion": true, | |
"a11y/no-outline-none": true, | |
"a11y/selector-pseudo-class-focus": true, | |
"plugin/declaration-block-no-ignored-properties": true, | |
"order/properties-alphabetical-order": null, | |
"order/order": [ | |
[ | |
"custom-properties", | |
"dollar-variables", | |
{ | |
"type": "at-rule", | |
"name": "extend" | |
}, | |
{ | |
"type": "at-rule", | |
"name": "include" | |
}, | |
"declarations", | |
{ | |
"type": "rule", | |
"selector": "/^&:/" | |
}, | |
{ | |
"type": "rule", | |
"selector": "/^&/" | |
}, | |
"rules", | |
{ | |
"type": "at-rule" | |
}, | |
{ | |
"type": "at-rule", | |
"name": "include", | |
"hasBlock": true | |
}, | |
{ | |
"type": "at-rule", | |
"name": "include", | |
"parameter": "breakpoint", | |
"hasBlock": true | |
} | |
] | |
], | |
"order/properties-order": [ | |
[ | |
"content", | |
{ | |
"order": "flexible", | |
"properties": [ | |
"position", | |
"top", | |
"right", | |
"bottom", | |
"left" | |
] | |
}, | |
{ | |
"order": "flexible", | |
"properties": [ | |
"overflow", | |
"overflow-x", | |
"overflow-y", | |
"z-index" | |
] | |
}, | |
{ | |
"order": "flexible", | |
"properties": [ | |
"display", | |
"flex", | |
"flex-grow", | |
"flex-shrink", | |
"flex-basis", | |
"flex-flow", | |
"flex-direction", | |
"flex-wrap", | |
"justify-content", | |
"align-content", | |
"align-items", | |
"align-self", | |
"order", | |
"float", | |
"clear", | |
"box-sizing" | |
] | |
}, | |
{ | |
"order": "flexible", | |
"properties": [ | |
"width", | |
"min-width", | |
"max-width", | |
"height", | |
"min-height", | |
"max-height" | |
] | |
}, | |
{ | |
"order": "flexible", | |
"properties": [ | |
"padding", | |
"padding-top", | |
"padding-right", | |
"padding-bottom", | |
"padding-left" | |
] | |
}, | |
{ | |
"order": "flexible", | |
"properties": [ | |
"border", | |
"border-width", | |
"border-style", | |
"border-color", | |
"border-top", | |
"border-top-width", | |
"border-top-style", | |
"border-top-color", | |
"border-right", | |
"border-right-width", | |
"border-right-style", | |
"border-right-color", | |
"border-bottom", | |
"border-bottom-width", | |
"border-bottom-style", | |
"border-bottom-color", | |
"border-left", | |
"border-left-width", | |
"border-left-style", | |
"border-left-color", | |
"border-radius", | |
"border-top-left-radius", | |
"border-top-right-radius", | |
"border-bottom-right-radius", | |
"border-bottom-left-radius", | |
"border-image", | |
"border-image-source", | |
"border-image-slice", | |
"border-image-width", | |
"border-image-outset", | |
"border-image-repeat", | |
"border-collapse", | |
"border-spacing" | |
] | |
}, | |
{ | |
"order": "flexible", | |
"properties": [ | |
"margin", | |
"margin-top", | |
"margin-right", | |
"margin-bottom", | |
"margin-left" | |
] | |
}, | |
{ | |
"order": "flexible", | |
"properties": [ | |
"color", | |
"font", | |
"font-weight", | |
"font-size", | |
"font-family", | |
"font-style", | |
"line-height", | |
"letter-spacing", | |
"text-align", | |
"text-decoration" | |
] | |
}, | |
{ | |
"order": "flexible", | |
"properties": [ | |
"font-variant", | |
"font-size-adjust", | |
"font-stretch", | |
"font-effect", | |
"font-emphasize", | |
"font-emphasize-position", | |
"font-emphasize-style", | |
"font-smooth", | |
"direction", | |
"white-space", | |
"text-align-last", | |
"text-transform", | |
"text-emphasis", | |
"text-emphasis-color", | |
"text-emphasis-style", | |
"text-emphasis-position", | |
"text-indent", | |
"text-justify", | |
"text-outline", | |
"text-wrap", | |
"text-overflow", | |
"text-overflow-ellipsis", | |
"text-overflow-mode", | |
"text-orientation", | |
"text-shadow", | |
"vertical-align", | |
"word-wrap", | |
"word-break", | |
"word-spacing", | |
"overflow-wrap", | |
"tab-size", | |
"hyphens", | |
"unicode-bidi", | |
"columns", | |
"column-count", | |
"column-fill", | |
"column-gap", | |
"column-rule", | |
"column-rule-color", | |
"column-rule-style", | |
"column-rule-width", | |
"column-span", | |
"column-width", | |
"page-break-after", | |
"page-break-before", | |
"page-break-inside", | |
"src" | |
] | |
}, | |
{ | |
"order": "flexible", | |
"properties": [ | |
"list-style", | |
"list-style-position", | |
"list-style-type", | |
"list-style-image", | |
"table-layout", | |
"empty-cells", | |
"caption-side" | |
] | |
}, | |
{ | |
"order": "flexible", | |
"properties": [ | |
"background", | |
"background-color", | |
"background-image", | |
"background-repeat", | |
"background-position", | |
"background-position-x", | |
"background-position-y", | |
"background-size", | |
"background-clip", | |
"background-origin", | |
"background-attachment", | |
"background-blend-mode" | |
] | |
}, | |
{ | |
"order": "flexible", | |
"properties": [ | |
"box-decoration-break", | |
"outline", | |
"outline-width", | |
"outline-style", | |
"outline-color", | |
"outline-offset", | |
"box-shadow", | |
"transform", | |
"transform-origin", | |
"transform-style", | |
"backface-visibility", | |
"perspective", | |
"perspective-origin", | |
"visibility", | |
"cursor", | |
"opacity", | |
"filter", | |
"backdrop-filter" | |
] | |
}, | |
{ | |
"order": "flexible", | |
"properties": [ | |
"transition", | |
"transition-delay", | |
"transition-timing-function", | |
"transition-duration", | |
"transition-property" | |
] | |
}, | |
{ | |
"order": "flexible", | |
"properties": [ | |
"animation", | |
"animation-name", | |
"animation-duration", | |
"animation-play-state", | |
"animation-timing-function", | |
"animation-delay", | |
"animation-iteration-count", | |
"animation-direction", | |
"animation-fill-mode" | |
] | |
}, | |
{ | |
"order": "flexible", | |
"properties": [ | |
"appearance", | |
"clip", | |
"clip-path", | |
"counter-reset", | |
"counter-increment", | |
"resize", | |
"user-select", | |
"nav-index", | |
"nav-up", | |
"nav-right", | |
"nav-down", | |
"nav-left", | |
"pointer-events", | |
"quotes", | |
"touch-action", | |
"will-change", | |
"zoom", | |
"fill", | |
"fill-rule", | |
"clip-rule", | |
"stroke" | |
] | |
} | |
], | |
{ | |
"unspecified": "bottom" | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment