An ESLint plugin for CSS linting in Voicss template literals
- Install the plugin:
bun add -D voicss-eslint- Enable it in your ESLint config:
import voicss from 'voicss-eslint'
export default defineConfig([
// via the recommended config:
{
name: 'Voicss Rules',
files: ['**/*.ts?(x)'],
extends: [voicss.configs.recommended],
// plugins: { voicss }, // not necessary when using the recommended config
rules: { 'voicss/indent': 'off' }, // can still override rules here
},
// or directly:
{
name: 'Voicss Rules',
files: ['**/*.ts?(x)'],
plugins: { voicss },
rules: { 'voicss/indent': 'error' },
},
])💼 – included in the recommended config
🔧 – auto-fixable
| Rule Name | Description | 💼 | 🔧 |
|---|---|---|---|
indent |
Enforce consistent indentation | ✔️ | ✔️ |
quote-style |
Enforce consistent string quotes | ✔️ | ✔️ |
no-multiple-empty-lines |
Disallow multiple empty lines | ✔️ | ✔️ |
spacing |
Disallow extra spaces | ✔️ | ✔️ |