Skip to content

voicss/voicss-eslint

Repository files navigation

Voicss ESLint

An ESLint plugin for CSS linting in Voicss template literals

🕹️ Usage

  1. Install the plugin:
bun add -D voicss-eslint
  1. 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' },
	},
])

🧩 Rules

💼 – 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 ✔️ ✔️