stylelint-config-idiomatic-css

Stylelint config, for idiomatic css rules and auto-sorting with prettier.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
stylelint-config-idiomatic-css
1.1.04 years ago6 years agoMinified + gzip package size for stylelint-config-idiomatic-css in KB

Readme

stylelint-config-idiomatic-css
Stylelint config, for idiomatic css rules and auto-sorting with prettier.

Quick start

  1. Install

npm i -D stylelint stylelint-config-idiomatic-css

  1. Create .stylelintrc.js in root project folder.

module.exports = {
  extends: ['stylelint-config-idiomatic-css'],
}

  1. Install VSCode plugin

Another config examples

SCSS

npm i -D stylelint stylelint-config-standard stylelint-config-recommended-scss stylelint-config-idiomatic-css

module.exports = {
  extends: [
    'stylelint-config-standard',
    'stylelint-config-recommended-scss',
    'stylelint-config-idiomatic-css',
  ],
}

styled-components

Auto-sorting does`t work
npm i -D stylelint stylelint-processor-styled-components stylelint-config-standard stylelint-config-styled-components stylelint-config-idiomatic-css

module.exports = {
  processors: ['stylelint-processor-styled-components'],
  extends: [
    'stylelint-config-standard',
    'stylelint-config-styled-components',
    'stylelint-config-idiomatic-css',
  ],
  syntax: 'scss',
}

For use it with styled-components, u need some vscode settings
"stylelint.additionalDocumentSelectors": [
  "javascript"
],