mirror of
https://github.com/antebudimir/eslint-plugin-vanilla-extract.git
synced 2025-12-31 08:53:33 +00:00
feat 🥁: add prefer-logical-properties rule for i18n-friendly styles
- Add new rule `prefer-logical-properties` that enforces logical CSS properties over physical directional properties - Detects 140+ physical property mappings across margin, padding, border, inset, size, overflow, and scroll properties - Supports value-based detection for `text-align`, `float`, `clear`, and `resize` properties - Provides automatic fixes for all detected violations - Preserves original formatting (camelCase/kebab-case and quote style) - Configurable allowlist via `allow` option to skip specific properties - Comprehensive test coverage
This commit is contained in:
parent
69dd109311
commit
d5eae5dfc8
10 changed files with 1204 additions and 6 deletions
|
|
@ -6,11 +6,12 @@ import noPxUnitRule from './css-rules/no-px-unit/index.js';
|
|||
import noTrailingZeroRule from './css-rules/no-trailing-zero/rule-definition.js';
|
||||
import noUnknownUnitRule from './css-rules/no-unknown-unit/rule-definition.js';
|
||||
import noZeroUnitRule from './css-rules/no-zero-unit/rule-definition.js';
|
||||
import preferLogicalPropertiesRule from './css-rules/prefer-logical-properties/index.js';
|
||||
|
||||
const vanillaExtract = {
|
||||
meta: {
|
||||
name: '@antebudimir/eslint-plugin-vanilla-extract',
|
||||
version: '1.13.0',
|
||||
version: '1.14.0',
|
||||
},
|
||||
rules: {
|
||||
'alphabetical-order': alphabeticalOrderRule,
|
||||
|
|
@ -21,6 +22,7 @@ const vanillaExtract = {
|
|||
'no-trailing-zero': noTrailingZeroRule,
|
||||
'no-unknown-unit': noUnknownUnitRule,
|
||||
'no-zero-unit': noZeroUnitRule,
|
||||
'prefer-logical-properties': preferLogicalPropertiesRule,
|
||||
},
|
||||
configs: {},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue