This package provides a Stylelint shareable config for the VI Company's Sass coding style.
To make use of this config, install Stylelint and this package as a development dependency of your project:
npm i stylelint stylelint-config-vi -D
Create a .stylelintrc.js
config file in the root of the project:
module.exports = {
extends: 'stylelint-config-vi'
};
If you use Stylelint to lint anything other than CSS files, you will need to install and configure these syntaxes.
Install the PostCSS SCSS Syntax:
npm i postcss postcss-scss -D
Update your .stylelintrc.js
file
module.exports = {
extends: 'stylelint-config-vi',
overrides: [
{
files: ['**/*.scss'],
customSyntax: 'postcss-scss',
},
],
};
Add the language identifiers you want to validate using the stylelint.validate
option:
- To the Workspace Settings:
Ctrl+Shift+P
and select Preferences: Open Workspace Settings (JSON) - Or User settings:
Ctrl+Shift+P
and select Preferences: Open Settings (JSON)`
{
"stylelint.validate": ["css", "postcss", "scss"]
}
Install the PostCSS HTML Syntax:
npm i postcss-html -D
Update your .stylelintrc.js
file
module.exports = {
extends: 'stylelint-config-vi',
overrides: [
{
files: ['**/*.vue'],
customSyntax: 'postcss-html',
},
],
};
Add the language identifiers you want to validate using the stylelint.validate
option:
- To the Workspace Settings:
Ctrl+Shift+P
and selectPreferences: Open Workspace Settings (JSON)
- Or User settings:
Ctrl+Shift+P
and selectPreferences: Open Settings (JSON)
{
"stylelint.validate": ["css", "postcss", "vue"]
}
MIT © VI Company