mirror of
https://github.com/antebudimir/eslint-plugin-vanilla-extract.git
synced 2026-01-02 17:43:31 +00:00
24 lines
671 B
TypeScript
24 lines
671 B
TypeScript
|
|
import type { Rule } from 'eslint';
|
||
|
|
import { createNodeVisitors } from '../shared-utils/order-strategy-visitor-creator.js';
|
||
|
|
|
||
|
|
const alphabeticalOrderRule: Rule.RuleModule = {
|
||
|
|
meta: {
|
||
|
|
type: 'suggestion',
|
||
|
|
docs: {
|
||
|
|
description: 'enforce alphabetical CSS property ordering in vanilla-extract styles',
|
||
|
|
category: 'Stylistic Issues',
|
||
|
|
recommended: true,
|
||
|
|
},
|
||
|
|
fixable: 'code',
|
||
|
|
schema: [],
|
||
|
|
messages: {
|
||
|
|
alphabeticalOrder: "Property '{{next}}' should come before '{{current}}' in alphabetical order.",
|
||
|
|
},
|
||
|
|
},
|
||
|
|
create(context) {
|
||
|
|
return createNodeVisitors(context, 'alphabetical');
|
||
|
|
},
|
||
|
|
};
|
||
|
|
|
||
|
|
export default alphabeticalOrderRule;
|