Skip to content

Instantly share code, notes, and snippets.

@jayperryworks
Created March 2, 2021 19:13
Show Gist options
  • Save jayperryworks/13d5b5c52e387d1f922c164a5f9e5812 to your computer and use it in GitHub Desktop.
Save jayperryworks/13d5b5c52e387d1f922c164a5f9e5812 to your computer and use it in GitHub Desktop.
StyleLint config for SCSS files (using my naming conventions)
{
"extends": "stylelint-config-sass-guidelines",
"plugins": [
"stylelint-scss",
"stylelint-order"
],
"rules": {
"indentation": "tab",
"selector-no-qualifying-type": [
true,
{
"ignore": ["class", "attribute"]
}
],
"selector-class-pattern": "^([a-z][a-z0-9]*)(?:-[a-z0-9]+|\\@[a-z0-9]+)*$",
"scss/dollar-variable-pattern": "^-?[a-z]+([a-z0-9-]+[a-z0-9]+)?$",
"scss/at-mixin-pattern": "^-?[a-z]+([a-z0-9-]+[a-z0-9]+)?$",
"scss/at-function-pattern": "^-?[a-z]+([a-z0-9-]+[a-z0-9]+)?$",
"max-nesting-depth": [
2,
{
"ignore": ["pseudo-classes", "blockless-at-rules"],
"ignoreAtRules": [
"@if",
"@else",
"@else if",
"@each",
"@include"
]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment