Package Exports
- @tiagoporto/stylelint-config
Readme
@tiagoporto/stylelint-config
Shareable Config for stylelint.
Installation
npm install --save-dev stylelint @tiagoporto/stylelint-configUsage
// .stylelintrc.mjs
export default {
extends: ['@tiagoporto/stylelint-config'],
}In package.json add the following scripts:
{
"scripts": {
"lint:styles": "stylelint \"**/*.{css,scss}\"",
"lint:styles:fix": "stylelint \"**/*.{css,scss}\" --fix"
}
}Lint-staged
Check staged markdown
// .lintstagedrc.mjs
export default {
'*.{scss,vue}': ['stylelint --fix'],
}Editor
For VSCode is recommended the following extensions:
// .vscode/settings.json
{
"editor.codeActionsOnSave": {
"source.fixAll.stylelint": "always"
},
"stylelint.validate": ["css", "scss"]
}