feat 🥁: add recommended config with error-level rules

Add a recommended configuration preset that enables concentric-order and no-empty-style-blocks rules with error severity.

- Fix plugin configuration structure to work properly with ESLint 9
- Set concentric-order and no-empty-style-blocks as recommended rules
- Use error severity for recommended rules to enforce best practices
- Maintain backward compatibility with existing implementations

This change improves developer experience by providing sensible defaults while maintaining flexibility for customization.
This commit is contained in:
Ante Budimir 2025-04-07 13:00:55 +03:00
parent 175ce9aef8
commit 52d38d4477
4 changed files with 55 additions and 29 deletions

View file

@ -6,7 +6,7 @@ import noEmptyStyleBlocksRule from './css-rules/no-empty-blocks/rule-definition.
export const vanillaExtract = {
meta: {
name: '@antebudimir/eslint-plugin-vanilla-extract',
version: '1.6.0',
version: '1.7.0',
},
rules: {
'alphabetical-order': alphabeticalOrderRule,
@ -15,32 +15,13 @@ export const vanillaExtract = {
'no-empty-style-blocks': noEmptyStyleBlocksRule,
},
configs: {
recommended: [
{
plugins: {
'vanilla-extract': {
rules: {
'concentric-order': concentricOrderRule,
'no-empty-style-blocks': noEmptyStyleBlocksRule,
},
},
},
rules: {
'vanilla-extract/concentric-order': 'warn',
'vanilla-extract/no-empty-style-blocks': 'warn',
},
recommended: {
plugins: ['vanilla-extract'],
rules: {
'vanilla-extract/concentric-order': 'error',
'vanilla-extract/no-empty-style-blocks': 'error',
},
],
alphabetical: [
{
plugins: {
'vanilla-extract': {
rules: { 'alphabetical-order': alphabeticalOrderRule },
},
},
rules: { 'vanilla-extract/alphabetical-order': 'warn' },
},
],
},
},
};