@meludi/stylelint-config-scss
v0.4.0
Published
Shareable configuration for stylelint
Downloads
21
Maintainers
Readme
@meludi/stylelint-config-scss
This package provides Stylelint settings as an shareable stylelint configuration.
Configs
Postcss
Installation
Install the package with:
$ npm i -D @meludi/stylelint-config-scss
Find out and install peerDependencies
.
$ npm info "@meludi/stylelint-config-scss@latest" peerDependencies
Usage
Add the following to your stylelint.config.js
:
// stylelint.config.js
module.exports = {
extends: '@meludi/stylelint-config-scss',
};
Add the following to your postcss.config.js
:
// postcss.config.js
module.exports = require('@meludi/stylelint-config-scss/postcss.config');
Recommendation
Add the following config files to the root of your project:
- .browserslistrc see Posstcss - autoprefixer
- .stylelintignore
- .editorconfig
NPM script
Add the following script to your package.json
for easy usage:
"scripts": {
"lint:css": "stylelint './**/*.scss'",
"lint:css:fix": "npm run lint:css -- --fix",
}
Recommendation
Use prettier to format your scss files: @meludi/eslint-config-prettier
Configuration
You can overwrite, extend and unset rules in your stylelint.config.js
VS Code
Copy .vscode.example to the root of your project and rename it to .vscode
.