Skip to content

Instantly share code, notes, and snippets.

@drwpow
Created March 8, 2018 13:38
Show Gist options
  • Save drwpow/76c3f19dad1134f09a0f32dc896de785 to your computer and use it in GitHub Desktop.
Save drwpow/76c3f19dad1134f09a0f32dc896de785 to your computer and use it in GitHub Desktop.
Stylelint + Styled Components
{
"plugins": [
"stylelint-order"
],
"processors": ["stylelint-processor-styled-components"],
"extends": [
"stylelint-config-recommended",
"stylelint-config-styled-components"
],
"rules": {
"order/properties-alphabetical-order": true,
"rule-empty-line-before": "always",
"selector-type-no-unknown": [true, { ignore: ["default-namespace"] }],
"selector-pseudo-element-colon-notation": "double"
},
}
yarn add --dev stylelint stylelint-config-standard stylelint-config-styled-components stylelint-order stylelint-processor-styled-components

To run stylelint, add the following script to package.json:

  "stylelint": "stylelint src/**/*.js",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment