mirror of
https://github.com/antebudimir/eslint-plugin-vanilla-extract.git
synced 2025-12-31 08:53:33 +00:00
feat 🥁: add no-empty-style-blocks rule
Add comprehensive rule to detect and prevent empty CSS style blocks: - Identify style objects with no properties - Flag empty style blocks as potential code quality issues - Provide auto-fix capability to remove empty blocks - Handle edge cases like comments-only blocks This rule helps maintain cleaner codebases by eliminating empty style definitions that often result from incomplete refactoring or forgotten implementations, reducing confusion and unnecessary code.
This commit is contained in:
parent
f346002fb0
commit
175ce9aef8
45 changed files with 2674 additions and 566 deletions
14
src/index.ts
14
src/index.ts
|
|
@ -1,26 +1,34 @@
|
|||
import alphabeticalOrderRule from './css-rules/alphabetical-order/index.js';
|
||||
import concentricOrderRule from './css-rules/concentric-order/index.js';
|
||||
import customOrderRule from './css-rules/custom-order/rule-definition.js';
|
||||
import noEmptyStyleBlocksRule from './css-rules/no-empty-blocks/rule-definition.js';
|
||||
|
||||
export const vanillaExtract = {
|
||||
meta: {
|
||||
name: '@antebudimir/eslint-plugin-vanilla-extract',
|
||||
version: '1.5.3',
|
||||
version: '1.6.0',
|
||||
},
|
||||
rules: {
|
||||
'alphabetical-order': alphabeticalOrderRule,
|
||||
'concentric-order': concentricOrderRule,
|
||||
'custom-order': customOrderRule,
|
||||
'no-empty-style-blocks': noEmptyStyleBlocksRule,
|
||||
},
|
||||
configs: {
|
||||
recommended: [
|
||||
{
|
||||
plugins: {
|
||||
'vanilla-extract': {
|
||||
rules: { 'concentric-order': concentricOrderRule },
|
||||
rules: {
|
||||
'concentric-order': concentricOrderRule,
|
||||
'no-empty-style-blocks': noEmptyStyleBlocksRule,
|
||||
},
|
||||
},
|
||||
},
|
||||
rules: { 'vanilla-extract/concentric-order': 'warn' },
|
||||
rules: {
|
||||
'vanilla-extract/concentric-order': 'warn',
|
||||
'vanilla-extract/no-empty-style-blocks': 'warn',
|
||||
},
|
||||
},
|
||||
],
|
||||
alphabetical: [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue