StyleLint shareable config for TailwindCSS style.
pnpm add -D @soyhuce/stylelint-config-tailwindcss
# with standard config and StyleLint
pnpm add -D stylelint @soyhuce/stylelint-config @soyhuce/stylelint-config-tailwindcss
In order to use this config, choose the one you want and add this configuration to your package.json
:
{
"stylelint": {
"extends": [
"@soyhuce/stylelint-config",
+ "@soyhuce/stylelint-config-tailwindcss"
]
}
}
Or add a .stylelintrc.js
file to your project root containing:
module.exports = {
extends: [
'@soyhuce/stylelint-config',
+ '@soyhuce/stylelint-config-tailwindcss'
]
}
We recommend turning on VSCode settings to automatically run stylelint --fix
on save.
"editor.codeActionsOnSave": {
+ "source.fixAll.stylelint": true
}
This will automatically format your code once you save.
MIT