1.0.2 • Published 5 months ago

@kelysty/stylelint-config v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

@kelysty/stylelint-config

Install

Using npm:

npm install --save-dev stylelint postcss @kelysty/stylelint-config

Using yarn:

yarn add --dev stylelint postcss @kelysty/stylelint-config

Usage

Add .stylelintrc.js file in the project root with the following content:

module.exports = {
  extends: ['@kelysty/stylelint-config'],
};

Prettier

If you are using Prettier, extend root config with the additional rules:

module.exports = {
  extends: ['@kelysty/stylelint-config', '@kelysty/stylelint-config/prettier'],
};

Order

If you want to order properties in your css files, extend root config with the additional rules:

module.exports = {
  extends: ['@kelysty/stylelint-config', '@kelysty/stylelint-config/order'],
};

Scripts

Do not forget to add following scripts in your package.json file:

  "scripts": {
    "lint": "yarn run lint:styles && yarn run lint:other",
    "lint:styles": "stylelint '**/*.{css,scss}' --report-needless-disables",
    "lint:other": "yarn run prettier -- --check",
  }