mirror of
https://github.com/antebudimir/eslint-plugin-vanilla-extract.git
synced 2026-01-01 17:23:31 +00:00
refactor ♻️: improve code quality and test coverage
- Fix handling of missing groupOrder configuration - Refactor negative conditions to positive ones with optional chaining - Add comprehensive tests to achieve total coverage
This commit is contained in:
parent
5557409368
commit
46751da51b
15 changed files with 310 additions and 186 deletions
|
|
@ -40,7 +40,7 @@ export const createNodeVisitors = (
|
|||
return enforceConcentricCSSOrderInStyleObject;
|
||||
case 'userDefinedGroupOrder':
|
||||
if (!userDefinedGroupOrder || userDefinedGroupOrder.length === 0) {
|
||||
throw new Error('💥 👿 User-defined group order must be provided for userDefinedGroupOrder strategy');
|
||||
return enforceAlphabeticalCSSOrderInStyleObject;
|
||||
}
|
||||
return (ruleContext: Rule.RuleContext, node: TSESTree.Node) =>
|
||||
enforceUserDefinedGroupOrderInStyleObject(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue