mirror of
https://github.com/antebudimir/eslint-plugin-vanilla-extract.git
synced 2026-01-02 09:33:33 +00:00
feat 🥁: implement special ordering for fontFace APIs
- Ensure 'src' property always appears first - Sort remaining properties alphabetically - Handle both APIs correctly despite different argument structures - Handles font faces ordering the same in all 3 available CSS rules - Update documentation with fontFace ordering details
This commit is contained in:
parent
8916be7d16
commit
3e9bad1b02
12 changed files with 175 additions and 47 deletions
|
|
@ -12,7 +12,9 @@ const alphabeticalOrderRule: Rule.RuleModule = {
|
|||
fixable: 'code',
|
||||
schema: [],
|
||||
messages: {
|
||||
alphabeticalOrder: "Property '{{next}}' should come before '{{current}}' in alphabetical order.",
|
||||
alphabeticalOrder: "Property '{{nextProperty}}' should come before '{{currentProperty}}' in alphabetical order.",
|
||||
fontFaceOrder:
|
||||
"Properties in fontFace should be ordered with 'src' first, followed by other properties in alphabetical order. Property '{{nextProperty}}' should come before '{{currentProperty}}'.",
|
||||
},
|
||||
},
|
||||
create(context) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue