stylelint-config-hudochenkov

My Stylelint config

Usage no npm install needed!

<script type="module">
  import stylelintConfigHudochenkov from 'https://cdn.skypack.dev/stylelint-config-hudochenkov';
</script>

README

stylelint-config-hudochenkov

My configs for Stylelint. Uses rules from stylelint-order and stylelint-scss.

Available configs:

  • stylelint-config-hudochenkov — default config which includes rules from Stylelint core only.
  • stylelint-config-hudochenkov/dollar-variables — config for $dollar-variables. Uses stylelint-scss.
  • stylelint-config-hudochenkov/order — config for order of content within declaration blocks and properties order. Uses stylelint-order.
  • stylelint-config-hudochenkov/full — combines all configs together and includes:
    • stylelint-config-hudochenkov
    • stylelint-config-hudochenkov/dollar-variables
    • stylelint-config-hudochenkov/order

Installation

Install config:

npm install --save-dev stylelint-config-hudochenkov

If you're using stylelint-config-hudochenkov/dollar-variables or stylelint-config-hudochenkov/full, install additional plugin:

npm install --save-dev stylelint-scss

If you're using stylelint-config-hudochenkov/order or stylelint-config-hudochenkov/full, install additional plugin:

npm install --save-dev stylelint-order

Note: Additional plugins not listed as peerDependencies, because not every project need them. npm will shows warning after each npm install if not all peerDependencies are installed, even if they are not used.

Usage

Add chosen config to the extends section of your Stylelint configuration:

{
    "extends": ["stylelint-config-hudochenkov"]
}
{
    "extends": ["stylelint-config-hudochenkov/full"]
}

Recommended to run Stylelint with --max-warnings flag, because most of the rules has warning severity:

stylelint "**/*.css" --max-warnings 0