Stylelintrc Setup for VS Code and Prettier

{ "extends": "stylelint-config-recommended", "plugins": ["stylelint-order", "stylelint-scss"], "rules": { "rule-empty-line-before": [ "always", { "ignore": ["after-comment", "first-nested"] } ], "at-rule-no-unknown": [ true, { "ignoreAtRules": ["each", "extend", "for", "function", "if", "else", "warn", "include", "mixin", "return"] } ], "order/order": [ [ "custom-properties", "dollar-variables", { "type": "at-rule", "name": "extend" }, { "type": "at-rule", "name": "include", "hasBlock": false }, "declarations", { "type": "at-rule", "name": "include", "hasBlock": true }, "rules" ] ], "order/properties-alphabetical-order": true } }
# Stylelintrc
This Stylelintrc-Setup is based on 'stylelint-config-recommended' ( https://github.com/stylelint/stylelint-config-recommended/).

Rules: https://stylelint.io/user-guide/rules

## Setup for VS Code
- Install Extension "Prettier" ( https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
- Check "Prettier: Stylelint Integration" in VS Code Settings
- Create File .stylelintrc.json and add Code from above
- You may now use "Format Document" via "shift + alt + F"

## Requirements
- VS Code
- VS Code -> Prettier
- node/npm

## NPM Install
```
npm i --save-dev stylelint stylelint-config-recommended stylelint-order stylelint-scss
```

## prettierrc
See also: prettierrc https://codepad.co/snippet/prettierrc-setup-for-vs-code-and-prettier

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.