0.8.0 • Published 6 months ago

@wagtail/stylelint-config-wagtail v0.8.0

Weekly downloads
109
License
MIT
Repository
github
Last release
6 months ago

@wagtail/stylelint-config-wagtail

@wagtail/stylelint-config-wagtail on npm

Shareable stylelint config for CSS and SCSS, following Wagtail’s code style.

Usage

Our default export contains all of our Stylelint rules, along with specific plugins for SCSS syntax.

  1. Run npm install stylelint @wagtail/stylelint-config-wagtail --save-dev
  2. Add "extends": "@wagtail/stylelint-config-wagtail" to your .stylelintrc

Links

Contribution Guidelines

Install

  • Required Node
  • We recommend using nvm
  • Clone the project on to your computer
  • Run nvm install to ensure you have the correct Node version
  • Run npm install to install project dependencies
  • Ensure your editor is set up to use editorconfig, Prettier, Eslint and Stylelint

Development

  • Run nvm use to set Node to the correct version
  • Run tests via npm run test
  • Run linting via npm run lint
  • Run updates to Readme (if rules have changed) via npm run write-rules
  • Run preflight checks before committing final code via npm run preflight
  • Note: When working with the rule set, only modify the index.js file, not the .eslintrc file as it is for local linting only

Rules

RuleConfig
block-no-emptyEnabled
color-hex-length"short"
color-named"never"
color-no-invalid-hexEnabled
comment-no-emptyEnabled
custom-property-no-missing-var-functionEnabled
declaration-block-no-duplicate-custom-propertiesEnabled
declaration-block-no-duplicate-propertiesEnabled
declaration-block-no-redundant-longhand-propertiesEnabled
declaration-block-no-shorthand-property-overridesEnabled
declaration-block-single-line-max-declarations1
declaration-no-importantEnabled
declaration-property-value-allowed-listEnabled - see Config
declaration-property-value-disallowed-list{"/^border/":["none"]}, {"severity":"error"}
font-family-no-duplicate-namesEnabled
font-family-no-missing-generic-family-keywordEnabled
function-calc-no-unspaced-operatorEnabled
function-linear-gradient-no-nonstandard-directionEnabled
function-url-quotes"always"
keyframe-block-no-duplicate-selectorsEnabled
keyframe-declaration-no-importantEnabled
length-zero-no-unitEnabled
max-nesting-depth3
media-feature-name-no-unknownEnabled
named-grid-areas-no-invalidEnabled
no-descending-specificityEnabled
no-duplicate-at-import-rulesEnabled
no-duplicate-selectorsEnabled
no-empty-sourceEnabled
no-invalid-double-slash-commentsEnabled
no-invalid-position-at-import-rule{"ignoreAtRules":["use","forward"]}
no-irregular-whitespaceEnabled
order/order[{"name":"include","type":"at-rule"},"declarations"]
property-disallowed-list["/forced-color-adjust/","/left/","/right/","text-transform"]
property-no-unknownEnabled
property-no-vendor-prefixEnabled
rule-empty-line-before"always", {"except":["after-single-line-comment","first-nested"]}
scale-unlimited/declaration-strict-valueEnabled - see Config
scss/at-extend-no-missing-placeholderEnabled
scss/at-if-no-nullEnabled
scss/at-import-partial-extension-blacklist"scss"
scss/at-rule-no-unknownEnabled
scss/comment-no-emptyEnabled
scss/declaration-nested-properties-no-divided-groupsEnabled
scss/dollar-variable-no-missing-interpolationEnabled
scss/function-quote-no-quoted-strings-insideEnabled
scss/function-unquote-no-unquoted-strings-insideEnabled
scss/load-no-partial-leading-underscoreEnabled
scss/media-feature-value-dollar-variable"always", {"ignore":["keywords"]}
scss/no-duplicate-mixinsEnabled
scss/no-global-function-namesEnabled
scss/selector-no-redundant-nesting-selectorEnabled
scss/selector-no-union-class-nameEnabled
selector-anb-no-unmatchableEnabled
selector-attribute-name-disallowed-list"/^data-/"
selector-class-pattern{}, {"resolveNestedSelectors":true}
selector-max-combinators3
selector-max-id0
selector-max-specificity"0,3,3"
selector-no-qualifying-type{"ignore":["attribute","class"]}
selector-pseudo-class-no-unknownEnabled
selector-pseudo-element-no-unknownEnabled
selector-type-no-unknownEnabled
string-no-newlineEnabled
unit-no-unknownEnabled
value-no-vendor-prefixEnabled