mirror of
https://github.com/antebudimir/eslint-plugin-vanilla-extract.git
synced 2025-12-31 08:53:33 +00:00
feat 🥁: add no-zero-unit rule
This rule enforces unitless zero values in vanilla-extract style objects: - Automatically removes unnecessary units from zero values - Handles both positive and negative zero values - Preserves units where required (time properties, CSS functions) - Works with all vanilla-extract APIs
This commit is contained in:
parent
52d38d4477
commit
7dc7204749
20 changed files with 650 additions and 737 deletions
|
|
@ -2,17 +2,19 @@ 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';
|
||||
import noZeroUnitRule from './css-rules/no-zero-unit/rule-definition.js';
|
||||
|
||||
export const vanillaExtract = {
|
||||
meta: {
|
||||
name: '@antebudimir/eslint-plugin-vanilla-extract',
|
||||
version: '1.7.0',
|
||||
version: '1.8.0',
|
||||
},
|
||||
rules: {
|
||||
'alphabetical-order': alphabeticalOrderRule,
|
||||
'concentric-order': concentricOrderRule,
|
||||
'custom-order': customOrderRule,
|
||||
'no-empty-style-blocks': noEmptyStyleBlocksRule,
|
||||
'no-zero-unit': noZeroUnitRule,
|
||||
},
|
||||
configs: {
|
||||
recommended: {
|
||||
|
|
@ -20,6 +22,7 @@ export const vanillaExtract = {
|
|||
rules: {
|
||||
'vanilla-extract/concentric-order': 'error',
|
||||
'vanilla-extract/no-empty-style-blocks': 'error',
|
||||
'vanilla-extract/no-zero-unit': 'error',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue