Skip to content

Instantly share code, notes, and snippets.

@dwhenson
Created July 1, 2021 11:43
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dwhenson/7d2750e78f8b177f020c3ad126453562 to your computer and use it in GitHub Desktop.
Save dwhenson/7d2750e78f8b177f020c3ad126453562 to your computer and use it in GitHub Desktop.
Stylelint Config
{
"plugins": ["stylelint-order", "stylelint-scss"],
"defaultSeverity": "warning",
"rules": {
"at-rule-empty-line-before": [
"always",
{
"except": ["blockless-after-same-name-blockless", "first-nested"],
"ignore": ["after-comment", "first-nested", "blockless-after-same-name-blockless"]
}
],
"at-rule-disallowed-list": ["debug"],
"at-rule-no-unknown": null,
"at-rule-no-vendor-prefix": true,
"block-no-empty": true,
"block-opening-brace-space-before": "always",
"color-hex-case": "lower",
"color-named": "never",
"color-no-invalid-hex": true,
"custom-property-empty-line-before": [
"always",
{
"except": ["after-custom-property", "first-nested"],
"ignore": ["after-comment", "inside-single-line-block"]
}
],
"declaration-bang-space-after": "never",
"declaration-bang-space-before": "always",
"declaration-block-semicolon-newline-after": "always",
"declaration-block-semicolon-space-before": "never",
"declaration-block-single-line-max-declarations": 1,
"declaration-block-trailing-semicolon": "always",
"declaration-colon-space-after": "always-single-line",
"declaration-colon-space-before": "never",
"declaration-property-value-disallowed-list": {
"border": ["none"],
"border-top": ["none"],
"border-right": ["none"],
"border-bottom": ["none"],
"border-left": ["none"]
},
"function-comma-space-after": "always-single-line",
"function-parentheses-space-inside": "never",
"function-url-quotes": "always",
"indentation": 2,
"length-zero-no-unit": true,
"max-nesting-depth": [
1,
{
"ignoreAtRules": ["each", "media", "supports", "include"]
}
],
"media-feature-name-no-vendor-prefix": true,
"media-feature-parentheses-space-inside": "never",
"no-missing-end-of-source-newline": true,
"number-leading-zero": "always",
"number-no-trailing-zeros": true,
"property-no-unknown": true,
"property-no-vendor-prefix": true,
"rule-empty-line-before": [
"always-multi-line",
{
"except": ["first-nested"],
"ignore": ["after-comment"]
}
],
"scss/at-extend-no-missing-placeholder": true,
"scss/at-function-pattern": "^[a-z]+([a-z0-9-]+[a-z0-9]+)?$",
"scss/at-import-no-partial-leading-underscore": true,
"scss/at-import-partial-extension-blacklist": ["scss"],
"scss/at-mixin-pattern": "^[a-z]+([a-z0-9-]+[a-z0-9]+)?$",
"scss/at-rule-no-unknown": true,
"scss/dollar-variable-colon-space-after": "always",
"scss/dollar-variable-colon-space-before": "never",
"scss/dollar-variable-pattern": "^[_]?[a-z]+([a-z0-9-]+[a-z0-9]+)?$",
"scss/percent-placeholder-pattern": "^[a-z]+([a-z0-9-]+[a-z0-9]+)?$",
"scss/selector-no-redundant-nesting-selector": true,
"selector-class-pattern": [
"^[a-z0-9\\-]+$",
{
"message": "Selector should be written in lowercase with hyphens (selector-class-pattern)"
}
],
"selector-list-comma-newline-after": "always",
"selector-max-compound-selectors": 3,
"selector-max-id": 0,
"selector-no-qualifying-type": true,
"selector-no-vendor-prefix": true,
"selector-pseudo-element-colon-notation": "double",
"selector-pseudo-element-no-unknown": true,
"shorthand-property-no-redundant-values": true,
"string-quotes": "double",
"value-no-vendor-prefix": true,
"order/order": [
[
"custom-properties",
"dollar-variables",
{
"type": "at-rule",
"name": "extend"
},
{
"type": "at-rule",
"name": "include",
"hasBlock": false
},
"declarations",
{
"type": "at-rule",
"name": "include",
"hasBlock": true
}
]
],
"order/properties-order": [
[
"content",
"position",
"z-index",
"display",
"visibility",
"opacity",
"box-sizing",
"float",
"clear",
"top",
"bottom",
"left",
"right",
"flex",
"flex-flow",
"flex-basis",
"flex-direction",
"flex-grow",
"flex-shrink",
"flex-wrap",
"grid",
"grid-area",
"grid-template",
"grid-template-areas",
"grid-template-rows",
"grid-template-columns",
"grid-row",
"grid-row-start",
"grid-row-end",
"grid-column",
"grid-column-start",
"grid-column-end",
"grid-auto-rows",
"grid-auto-columns",
"grid-auto-flow",
"grid-gap",
"grid-row-gap",
"grid-column-gap",
"place-items",
"align-content",
"align-items",
"align-self",
"justify-content",
"justify-items",
"justify-self",
"order",
"gap",
"columns",
"column-gap",
"column-fill",
"column-rule",
"column-rule-width",
"column-rule-style",
"column-rule-color",
"column-span",
"column-count",
"column-width",
"width",
"height",
"min-width",
"min-height",
"max-width",
"max-height",
"padding",
"padding-top",
"padding-right",
"padding-bottom",
"padding-left",
"padding-block-start",
"padding-block-end",
"padding-inline-start",
"padding-inline-end",
"outline",
"outline-width",
"outline-style",
"outline-color",
"outline-offset",
"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",
"box-decoration-break",
"box-shadow",
"overflow",
"overflow-x",
"overflow-y",
"resize",
"margin",
"margin-top",
"margin-right",
"margin-bottom",
"margin-left",
"margin-block-start",
"margin-block-end",
"margin-inline-start",
"margin-inline-end",
"background",
"background-color",
"background-image",
"background-position",
"background-position-x",
"background-position-y",
"background-size",
"background-repeat",
"background-origin",
"background-clip",
"background-attachment",
"backface-visibility",
"perspective",
"perspective-origin",
"transform",
"transform-origin",
"transform-style",
"transition",
"transition-delay",
"transition-timing-function",
"transition-duration",
"transition-property",
"animation",
"animation-name",
"animation-duration",
"animation-play-state",
"animation-timing-function",
"animation-delay",
"animation-iteration-count",
"animation-direction",
"animation-fill-mode",
"list-style",
"list-style-type",
"list-style-position",
"list-style-image",
"caption-side",
"table-layout",
"border-collapse",
"border-spacing",
"empty-cells",
"font",
"font-family",
"font-size",
"font-weight",
"font-style",
"font-variant",
"font-size-adjust",
"font-stretch",
"line-height",
"letter-spacing",
"word-spacing",
"text-align",
"text-align-last",
"text-indent",
"text-justify",
"vertical-align",
"text-shadow",
"text-decoration",
"text-emphasis",
"text-emphasis-color",
"text-emphasis-style",
"text-emphasis-position",
"text-outline",
"text-transform",
"text-wrap",
"text-overflow",
"text-overflow-ellipsis",
"text-overflow-mode",
"color",
"word-wrap",
"word-break",
"hyphens",
"counter-reset",
"counter-increment",
"quotes",
"cursor",
"pointer-events",
"scroll-behavior"
]
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment