# @soleil-se/stylelint-config

Stylelint config based on `stylelint-config-standard` and `stylelint-config-rational-order`.

## Installation

`yarn add @soleil-se/stylelint-config --dev` Add all peerDependencies: `yarn add stylelint stylelint-config-rational-order stylelint-config-standard stylelint-order stylelint-scss --dev`

Create `.stylelintrc` in the root of the project containing:

```json
{
  "extends": "@soleil-se/stylelint-config"
}
```

## VS Code

Install [stylelint](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint) for VS Code.

### Settings

Open `settings.json` and add the following settings:

```json
"css.validate": false,
"less.validate": false,
"scss.validate": false,
// If you want autofix enabled
"editor.codeActionsOnSave": {
  "source.fixAll.stylelint": true
}
```

## CLI

Add the following to `package.json` and then adjust paths and file extensions.

```json
{
  "scripts": {
    "stylelint": "npx stylelint ./path/to/css/**/*.css --allow-empty-input",
    "stylelint-fix": "npx stylelint ./path/to/css/**/*.css --fix --allow-empty-input"
  }
}
```

<https://stylelint.io/user-guide/usage/cli>