@pandacss/eslint-plugin 0.2.8 → 0.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +502 -330
- package/dist/index.mjs +524 -342
- package/dist/utils/worker.js +137 -4
- package/dist/utils/worker.mjs +141 -4
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ var name, version;
|
|
|
10
10
|
var init_package = __esm({
|
|
11
11
|
"package.json"() {
|
|
12
12
|
name = "@pandacss/eslint-plugin";
|
|
13
|
-
version = "0.2.
|
|
13
|
+
version = "0.2.10";
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
|
|
@@ -602,176 +602,176 @@ var require_ast_spec = __commonJS({
|
|
|
602
602
|
init_esm_shims();
|
|
603
603
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
604
604
|
exports.AST_TOKEN_TYPES = exports.AST_NODE_TYPES = void 0;
|
|
605
|
-
var
|
|
606
|
-
(function(
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
})(
|
|
605
|
+
var AST_NODE_TYPES4;
|
|
606
|
+
(function(AST_NODE_TYPES5) {
|
|
607
|
+
AST_NODE_TYPES5["AccessorProperty"] = "AccessorProperty";
|
|
608
|
+
AST_NODE_TYPES5["ArrayExpression"] = "ArrayExpression";
|
|
609
|
+
AST_NODE_TYPES5["ArrayPattern"] = "ArrayPattern";
|
|
610
|
+
AST_NODE_TYPES5["ArrowFunctionExpression"] = "ArrowFunctionExpression";
|
|
611
|
+
AST_NODE_TYPES5["AssignmentExpression"] = "AssignmentExpression";
|
|
612
|
+
AST_NODE_TYPES5["AssignmentPattern"] = "AssignmentPattern";
|
|
613
|
+
AST_NODE_TYPES5["AwaitExpression"] = "AwaitExpression";
|
|
614
|
+
AST_NODE_TYPES5["BinaryExpression"] = "BinaryExpression";
|
|
615
|
+
AST_NODE_TYPES5["BlockStatement"] = "BlockStatement";
|
|
616
|
+
AST_NODE_TYPES5["BreakStatement"] = "BreakStatement";
|
|
617
|
+
AST_NODE_TYPES5["CallExpression"] = "CallExpression";
|
|
618
|
+
AST_NODE_TYPES5["CatchClause"] = "CatchClause";
|
|
619
|
+
AST_NODE_TYPES5["ChainExpression"] = "ChainExpression";
|
|
620
|
+
AST_NODE_TYPES5["ClassBody"] = "ClassBody";
|
|
621
|
+
AST_NODE_TYPES5["ClassDeclaration"] = "ClassDeclaration";
|
|
622
|
+
AST_NODE_TYPES5["ClassExpression"] = "ClassExpression";
|
|
623
|
+
AST_NODE_TYPES5["ConditionalExpression"] = "ConditionalExpression";
|
|
624
|
+
AST_NODE_TYPES5["ContinueStatement"] = "ContinueStatement";
|
|
625
|
+
AST_NODE_TYPES5["DebuggerStatement"] = "DebuggerStatement";
|
|
626
|
+
AST_NODE_TYPES5["Decorator"] = "Decorator";
|
|
627
|
+
AST_NODE_TYPES5["DoWhileStatement"] = "DoWhileStatement";
|
|
628
|
+
AST_NODE_TYPES5["EmptyStatement"] = "EmptyStatement";
|
|
629
|
+
AST_NODE_TYPES5["ExportAllDeclaration"] = "ExportAllDeclaration";
|
|
630
|
+
AST_NODE_TYPES5["ExportDefaultDeclaration"] = "ExportDefaultDeclaration";
|
|
631
|
+
AST_NODE_TYPES5["ExportNamedDeclaration"] = "ExportNamedDeclaration";
|
|
632
|
+
AST_NODE_TYPES5["ExportSpecifier"] = "ExportSpecifier";
|
|
633
|
+
AST_NODE_TYPES5["ExpressionStatement"] = "ExpressionStatement";
|
|
634
|
+
AST_NODE_TYPES5["ForInStatement"] = "ForInStatement";
|
|
635
|
+
AST_NODE_TYPES5["ForOfStatement"] = "ForOfStatement";
|
|
636
|
+
AST_NODE_TYPES5["ForStatement"] = "ForStatement";
|
|
637
|
+
AST_NODE_TYPES5["FunctionDeclaration"] = "FunctionDeclaration";
|
|
638
|
+
AST_NODE_TYPES5["FunctionExpression"] = "FunctionExpression";
|
|
639
|
+
AST_NODE_TYPES5["Identifier"] = "Identifier";
|
|
640
|
+
AST_NODE_TYPES5["IfStatement"] = "IfStatement";
|
|
641
|
+
AST_NODE_TYPES5["ImportAttribute"] = "ImportAttribute";
|
|
642
|
+
AST_NODE_TYPES5["ImportDeclaration"] = "ImportDeclaration";
|
|
643
|
+
AST_NODE_TYPES5["ImportDefaultSpecifier"] = "ImportDefaultSpecifier";
|
|
644
|
+
AST_NODE_TYPES5["ImportExpression"] = "ImportExpression";
|
|
645
|
+
AST_NODE_TYPES5["ImportNamespaceSpecifier"] = "ImportNamespaceSpecifier";
|
|
646
|
+
AST_NODE_TYPES5["ImportSpecifier"] = "ImportSpecifier";
|
|
647
|
+
AST_NODE_TYPES5["JSXAttribute"] = "JSXAttribute";
|
|
648
|
+
AST_NODE_TYPES5["JSXClosingElement"] = "JSXClosingElement";
|
|
649
|
+
AST_NODE_TYPES5["JSXClosingFragment"] = "JSXClosingFragment";
|
|
650
|
+
AST_NODE_TYPES5["JSXElement"] = "JSXElement";
|
|
651
|
+
AST_NODE_TYPES5["JSXEmptyExpression"] = "JSXEmptyExpression";
|
|
652
|
+
AST_NODE_TYPES5["JSXExpressionContainer"] = "JSXExpressionContainer";
|
|
653
|
+
AST_NODE_TYPES5["JSXFragment"] = "JSXFragment";
|
|
654
|
+
AST_NODE_TYPES5["JSXIdentifier"] = "JSXIdentifier";
|
|
655
|
+
AST_NODE_TYPES5["JSXMemberExpression"] = "JSXMemberExpression";
|
|
656
|
+
AST_NODE_TYPES5["JSXNamespacedName"] = "JSXNamespacedName";
|
|
657
|
+
AST_NODE_TYPES5["JSXOpeningElement"] = "JSXOpeningElement";
|
|
658
|
+
AST_NODE_TYPES5["JSXOpeningFragment"] = "JSXOpeningFragment";
|
|
659
|
+
AST_NODE_TYPES5["JSXSpreadAttribute"] = "JSXSpreadAttribute";
|
|
660
|
+
AST_NODE_TYPES5["JSXSpreadChild"] = "JSXSpreadChild";
|
|
661
|
+
AST_NODE_TYPES5["JSXText"] = "JSXText";
|
|
662
|
+
AST_NODE_TYPES5["LabeledStatement"] = "LabeledStatement";
|
|
663
|
+
AST_NODE_TYPES5["Literal"] = "Literal";
|
|
664
|
+
AST_NODE_TYPES5["LogicalExpression"] = "LogicalExpression";
|
|
665
|
+
AST_NODE_TYPES5["MemberExpression"] = "MemberExpression";
|
|
666
|
+
AST_NODE_TYPES5["MetaProperty"] = "MetaProperty";
|
|
667
|
+
AST_NODE_TYPES5["MethodDefinition"] = "MethodDefinition";
|
|
668
|
+
AST_NODE_TYPES5["NewExpression"] = "NewExpression";
|
|
669
|
+
AST_NODE_TYPES5["ObjectExpression"] = "ObjectExpression";
|
|
670
|
+
AST_NODE_TYPES5["ObjectPattern"] = "ObjectPattern";
|
|
671
|
+
AST_NODE_TYPES5["PrivateIdentifier"] = "PrivateIdentifier";
|
|
672
|
+
AST_NODE_TYPES5["Program"] = "Program";
|
|
673
|
+
AST_NODE_TYPES5["Property"] = "Property";
|
|
674
|
+
AST_NODE_TYPES5["PropertyDefinition"] = "PropertyDefinition";
|
|
675
|
+
AST_NODE_TYPES5["RestElement"] = "RestElement";
|
|
676
|
+
AST_NODE_TYPES5["ReturnStatement"] = "ReturnStatement";
|
|
677
|
+
AST_NODE_TYPES5["SequenceExpression"] = "SequenceExpression";
|
|
678
|
+
AST_NODE_TYPES5["SpreadElement"] = "SpreadElement";
|
|
679
|
+
AST_NODE_TYPES5["StaticBlock"] = "StaticBlock";
|
|
680
|
+
AST_NODE_TYPES5["Super"] = "Super";
|
|
681
|
+
AST_NODE_TYPES5["SwitchCase"] = "SwitchCase";
|
|
682
|
+
AST_NODE_TYPES5["SwitchStatement"] = "SwitchStatement";
|
|
683
|
+
AST_NODE_TYPES5["TaggedTemplateExpression"] = "TaggedTemplateExpression";
|
|
684
|
+
AST_NODE_TYPES5["TemplateElement"] = "TemplateElement";
|
|
685
|
+
AST_NODE_TYPES5["TemplateLiteral"] = "TemplateLiteral";
|
|
686
|
+
AST_NODE_TYPES5["ThisExpression"] = "ThisExpression";
|
|
687
|
+
AST_NODE_TYPES5["ThrowStatement"] = "ThrowStatement";
|
|
688
|
+
AST_NODE_TYPES5["TryStatement"] = "TryStatement";
|
|
689
|
+
AST_NODE_TYPES5["UnaryExpression"] = "UnaryExpression";
|
|
690
|
+
AST_NODE_TYPES5["UpdateExpression"] = "UpdateExpression";
|
|
691
|
+
AST_NODE_TYPES5["VariableDeclaration"] = "VariableDeclaration";
|
|
692
|
+
AST_NODE_TYPES5["VariableDeclarator"] = "VariableDeclarator";
|
|
693
|
+
AST_NODE_TYPES5["WhileStatement"] = "WhileStatement";
|
|
694
|
+
AST_NODE_TYPES5["WithStatement"] = "WithStatement";
|
|
695
|
+
AST_NODE_TYPES5["YieldExpression"] = "YieldExpression";
|
|
696
|
+
AST_NODE_TYPES5["TSAbstractAccessorProperty"] = "TSAbstractAccessorProperty";
|
|
697
|
+
AST_NODE_TYPES5["TSAbstractKeyword"] = "TSAbstractKeyword";
|
|
698
|
+
AST_NODE_TYPES5["TSAbstractMethodDefinition"] = "TSAbstractMethodDefinition";
|
|
699
|
+
AST_NODE_TYPES5["TSAbstractPropertyDefinition"] = "TSAbstractPropertyDefinition";
|
|
700
|
+
AST_NODE_TYPES5["TSAnyKeyword"] = "TSAnyKeyword";
|
|
701
|
+
AST_NODE_TYPES5["TSArrayType"] = "TSArrayType";
|
|
702
|
+
AST_NODE_TYPES5["TSAsExpression"] = "TSAsExpression";
|
|
703
|
+
AST_NODE_TYPES5["TSAsyncKeyword"] = "TSAsyncKeyword";
|
|
704
|
+
AST_NODE_TYPES5["TSBigIntKeyword"] = "TSBigIntKeyword";
|
|
705
|
+
AST_NODE_TYPES5["TSBooleanKeyword"] = "TSBooleanKeyword";
|
|
706
|
+
AST_NODE_TYPES5["TSCallSignatureDeclaration"] = "TSCallSignatureDeclaration";
|
|
707
|
+
AST_NODE_TYPES5["TSClassImplements"] = "TSClassImplements";
|
|
708
|
+
AST_NODE_TYPES5["TSConditionalType"] = "TSConditionalType";
|
|
709
|
+
AST_NODE_TYPES5["TSConstructorType"] = "TSConstructorType";
|
|
710
|
+
AST_NODE_TYPES5["TSConstructSignatureDeclaration"] = "TSConstructSignatureDeclaration";
|
|
711
|
+
AST_NODE_TYPES5["TSDeclareFunction"] = "TSDeclareFunction";
|
|
712
|
+
AST_NODE_TYPES5["TSDeclareKeyword"] = "TSDeclareKeyword";
|
|
713
|
+
AST_NODE_TYPES5["TSEmptyBodyFunctionExpression"] = "TSEmptyBodyFunctionExpression";
|
|
714
|
+
AST_NODE_TYPES5["TSEnumDeclaration"] = "TSEnumDeclaration";
|
|
715
|
+
AST_NODE_TYPES5["TSEnumMember"] = "TSEnumMember";
|
|
716
|
+
AST_NODE_TYPES5["TSExportAssignment"] = "TSExportAssignment";
|
|
717
|
+
AST_NODE_TYPES5["TSExportKeyword"] = "TSExportKeyword";
|
|
718
|
+
AST_NODE_TYPES5["TSExternalModuleReference"] = "TSExternalModuleReference";
|
|
719
|
+
AST_NODE_TYPES5["TSFunctionType"] = "TSFunctionType";
|
|
720
|
+
AST_NODE_TYPES5["TSInstantiationExpression"] = "TSInstantiationExpression";
|
|
721
|
+
AST_NODE_TYPES5["TSImportEqualsDeclaration"] = "TSImportEqualsDeclaration";
|
|
722
|
+
AST_NODE_TYPES5["TSImportType"] = "TSImportType";
|
|
723
|
+
AST_NODE_TYPES5["TSIndexedAccessType"] = "TSIndexedAccessType";
|
|
724
|
+
AST_NODE_TYPES5["TSIndexSignature"] = "TSIndexSignature";
|
|
725
|
+
AST_NODE_TYPES5["TSInferType"] = "TSInferType";
|
|
726
|
+
AST_NODE_TYPES5["TSInterfaceBody"] = "TSInterfaceBody";
|
|
727
|
+
AST_NODE_TYPES5["TSInterfaceDeclaration"] = "TSInterfaceDeclaration";
|
|
728
|
+
AST_NODE_TYPES5["TSInterfaceHeritage"] = "TSInterfaceHeritage";
|
|
729
|
+
AST_NODE_TYPES5["TSIntersectionType"] = "TSIntersectionType";
|
|
730
|
+
AST_NODE_TYPES5["TSIntrinsicKeyword"] = "TSIntrinsicKeyword";
|
|
731
|
+
AST_NODE_TYPES5["TSLiteralType"] = "TSLiteralType";
|
|
732
|
+
AST_NODE_TYPES5["TSMappedType"] = "TSMappedType";
|
|
733
|
+
AST_NODE_TYPES5["TSMethodSignature"] = "TSMethodSignature";
|
|
734
|
+
AST_NODE_TYPES5["TSModuleBlock"] = "TSModuleBlock";
|
|
735
|
+
AST_NODE_TYPES5["TSModuleDeclaration"] = "TSModuleDeclaration";
|
|
736
|
+
AST_NODE_TYPES5["TSNamedTupleMember"] = "TSNamedTupleMember";
|
|
737
|
+
AST_NODE_TYPES5["TSNamespaceExportDeclaration"] = "TSNamespaceExportDeclaration";
|
|
738
|
+
AST_NODE_TYPES5["TSNeverKeyword"] = "TSNeverKeyword";
|
|
739
|
+
AST_NODE_TYPES5["TSNonNullExpression"] = "TSNonNullExpression";
|
|
740
|
+
AST_NODE_TYPES5["TSNullKeyword"] = "TSNullKeyword";
|
|
741
|
+
AST_NODE_TYPES5["TSNumberKeyword"] = "TSNumberKeyword";
|
|
742
|
+
AST_NODE_TYPES5["TSObjectKeyword"] = "TSObjectKeyword";
|
|
743
|
+
AST_NODE_TYPES5["TSOptionalType"] = "TSOptionalType";
|
|
744
|
+
AST_NODE_TYPES5["TSParameterProperty"] = "TSParameterProperty";
|
|
745
|
+
AST_NODE_TYPES5["TSPrivateKeyword"] = "TSPrivateKeyword";
|
|
746
|
+
AST_NODE_TYPES5["TSPropertySignature"] = "TSPropertySignature";
|
|
747
|
+
AST_NODE_TYPES5["TSProtectedKeyword"] = "TSProtectedKeyword";
|
|
748
|
+
AST_NODE_TYPES5["TSPublicKeyword"] = "TSPublicKeyword";
|
|
749
|
+
AST_NODE_TYPES5["TSQualifiedName"] = "TSQualifiedName";
|
|
750
|
+
AST_NODE_TYPES5["TSReadonlyKeyword"] = "TSReadonlyKeyword";
|
|
751
|
+
AST_NODE_TYPES5["TSRestType"] = "TSRestType";
|
|
752
|
+
AST_NODE_TYPES5["TSSatisfiesExpression"] = "TSSatisfiesExpression";
|
|
753
|
+
AST_NODE_TYPES5["TSStaticKeyword"] = "TSStaticKeyword";
|
|
754
|
+
AST_NODE_TYPES5["TSStringKeyword"] = "TSStringKeyword";
|
|
755
|
+
AST_NODE_TYPES5["TSSymbolKeyword"] = "TSSymbolKeyword";
|
|
756
|
+
AST_NODE_TYPES5["TSTemplateLiteralType"] = "TSTemplateLiteralType";
|
|
757
|
+
AST_NODE_TYPES5["TSThisType"] = "TSThisType";
|
|
758
|
+
AST_NODE_TYPES5["TSTupleType"] = "TSTupleType";
|
|
759
|
+
AST_NODE_TYPES5["TSTypeAliasDeclaration"] = "TSTypeAliasDeclaration";
|
|
760
|
+
AST_NODE_TYPES5["TSTypeAnnotation"] = "TSTypeAnnotation";
|
|
761
|
+
AST_NODE_TYPES5["TSTypeAssertion"] = "TSTypeAssertion";
|
|
762
|
+
AST_NODE_TYPES5["TSTypeLiteral"] = "TSTypeLiteral";
|
|
763
|
+
AST_NODE_TYPES5["TSTypeOperator"] = "TSTypeOperator";
|
|
764
|
+
AST_NODE_TYPES5["TSTypeParameter"] = "TSTypeParameter";
|
|
765
|
+
AST_NODE_TYPES5["TSTypeParameterDeclaration"] = "TSTypeParameterDeclaration";
|
|
766
|
+
AST_NODE_TYPES5["TSTypeParameterInstantiation"] = "TSTypeParameterInstantiation";
|
|
767
|
+
AST_NODE_TYPES5["TSTypePredicate"] = "TSTypePredicate";
|
|
768
|
+
AST_NODE_TYPES5["TSTypeQuery"] = "TSTypeQuery";
|
|
769
|
+
AST_NODE_TYPES5["TSTypeReference"] = "TSTypeReference";
|
|
770
|
+
AST_NODE_TYPES5["TSUndefinedKeyword"] = "TSUndefinedKeyword";
|
|
771
|
+
AST_NODE_TYPES5["TSUnionType"] = "TSUnionType";
|
|
772
|
+
AST_NODE_TYPES5["TSUnknownKeyword"] = "TSUnknownKeyword";
|
|
773
|
+
AST_NODE_TYPES5["TSVoidKeyword"] = "TSVoidKeyword";
|
|
774
|
+
})(AST_NODE_TYPES4 || (exports.AST_NODE_TYPES = AST_NODE_TYPES4 = {}));
|
|
775
775
|
var AST_TOKEN_TYPES;
|
|
776
776
|
(function(AST_TOKEN_TYPES2) {
|
|
777
777
|
AST_TOKEN_TYPES2["Boolean"] = "Boolean";
|
|
@@ -7932,7 +7932,7 @@ function isRecipeVariant(node, context) {
|
|
|
7932
7932
|
const extraLength = styleObjectParent === "base" ? 0 : 4;
|
|
7933
7933
|
if (length < requiredLength + extraLength) return true;
|
|
7934
7934
|
}
|
|
7935
|
-
var import_scope_manager, getAncestor, getSyncOpts, getImportSpecifiers, hasPkgImport, isPandaConfigFunction, _getImports, importsCache, getImports, isValidStyledProp, isPandaIsh, findDeclaration, isLocalStyledFactory, isValidFile, isValidProperty, isPandaImport, isPandaProp, isStyledProperty, isInPandaFunction, isInJSXProp, isPandaAttribute, resolveLonghand, resolveShorthands, isColorAttribute, isColorToken,
|
|
7935
|
+
var import_scope_manager, getAncestor, getSyncOpts, getImportSpecifiers, hasPkgImport, isPandaConfigFunction, _getImports, importsCache, getImports, isValidStyledProp, isPandaIsh, findDeclaration, isLocalStyledFactory, isValidFile, isValidProperty, isPandaImport, isPandaProp, isStyledProperty, isInPandaFunction, isInJSXProp, isPandaAttribute, resolveLonghand, resolveShorthands, isColorAttribute, isColorToken, extractTokens, invalidTokensCache, getInvalidTokens, deprecatedTokensCache, getDeprecatedTokens, getTokenImport, getTaggedTemplateCaller;
|
|
7936
7936
|
var init_helpers = __esm({
|
|
7937
7937
|
"src/utils/helpers.ts"() {
|
|
7938
7938
|
"use strict";
|
|
@@ -8101,7 +8101,6 @@ var init_helpers = __esm({
|
|
|
8101
8101
|
if (!value) return;
|
|
8102
8102
|
return syncAction("isColorToken", getSyncOpts(context), value);
|
|
8103
8103
|
};
|
|
8104
|
-
invalidTokensCache = /* @__PURE__ */ new Map();
|
|
8105
8104
|
extractTokens = (value) => {
|
|
8106
8105
|
const regex = /token\(([^"'(),]+)(?:,\s*([^"'(),]+))?\)|\{([^{\r\n}]+)\}/g;
|
|
8107
8106
|
const matches = [];
|
|
@@ -8118,6 +8117,7 @@ var init_helpers = __esm({
|
|
|
8118
8117
|
}
|
|
8119
8118
|
return matches.filter(Boolean);
|
|
8120
8119
|
};
|
|
8120
|
+
invalidTokensCache = /* @__PURE__ */ new Map();
|
|
8121
8121
|
getInvalidTokens = (value, context) => {
|
|
8122
8122
|
if (invalidTokensCache.has(value)) {
|
|
8123
8123
|
return invalidTokensCache.get(value);
|
|
@@ -8128,6 +8128,19 @@ var init_helpers = __esm({
|
|
|
8128
8128
|
invalidTokensCache.set(value, invalidTokens);
|
|
8129
8129
|
return invalidTokens;
|
|
8130
8130
|
};
|
|
8131
|
+
deprecatedTokensCache = /* @__PURE__ */ new Map();
|
|
8132
|
+
getDeprecatedTokens = (prop, value, context) => {
|
|
8133
|
+
const propCategory = syncAction("getPropCategory", getSyncOpts(context), prop);
|
|
8134
|
+
const tokens = extractTokens(value);
|
|
8135
|
+
if (!propCategory && !tokens.length) return [];
|
|
8136
|
+
const values = tokens.length ? tokens : [{ category: propCategory, value: value.split("/")[0] }];
|
|
8137
|
+
if (deprecatedTokensCache.has(value)) {
|
|
8138
|
+
return deprecatedTokensCache.get(value);
|
|
8139
|
+
}
|
|
8140
|
+
const deprecatedTokens = syncAction("filterDeprecatedTokens", getSyncOpts(context), values);
|
|
8141
|
+
deprecatedTokensCache.set(value, deprecatedTokens);
|
|
8142
|
+
return deprecatedTokens;
|
|
8143
|
+
};
|
|
8131
8144
|
getTokenImport = (context) => {
|
|
8132
8145
|
const imports = _getImports(context);
|
|
8133
8146
|
return imports.find((imp) => imp.name === "token");
|
|
@@ -8350,9 +8363,125 @@ var init_no_debug = __esm({
|
|
|
8350
8363
|
}
|
|
8351
8364
|
});
|
|
8352
8365
|
|
|
8366
|
+
// src/rules/no-deprecated-tokens.ts
|
|
8367
|
+
import { AST_NODE_TYPES as AST_NODE_TYPES2 } from "@typescript-eslint/utils";
|
|
8368
|
+
import { isNodeOfTypes } from "@typescript-eslint/utils/ast-utils";
|
|
8369
|
+
var RULE_NAME4, rule4, no_deprecated_tokens_default;
|
|
8370
|
+
var init_no_deprecated_tokens = __esm({
|
|
8371
|
+
"src/rules/no-deprecated-tokens.ts"() {
|
|
8372
|
+
"use strict";
|
|
8373
|
+
init_esm_shims();
|
|
8374
|
+
init_helpers();
|
|
8375
|
+
init_utils();
|
|
8376
|
+
init_nodes();
|
|
8377
|
+
RULE_NAME4 = "no-deprecated-tokens";
|
|
8378
|
+
rule4 = createRule({
|
|
8379
|
+
name: RULE_NAME4,
|
|
8380
|
+
meta: {
|
|
8381
|
+
docs: {
|
|
8382
|
+
description: "Disallow the use of deprecated tokens within token function syntax."
|
|
8383
|
+
},
|
|
8384
|
+
messages: {
|
|
8385
|
+
noDeprecatedTokenPaths: "`{{token}}` is a deprecated token.",
|
|
8386
|
+
noDeprecatedTokens: "`{{token}}` is a deprecated {{category}} token."
|
|
8387
|
+
},
|
|
8388
|
+
type: "problem",
|
|
8389
|
+
schema: []
|
|
8390
|
+
},
|
|
8391
|
+
defaultOptions: [],
|
|
8392
|
+
create(context) {
|
|
8393
|
+
const deprecatedTokensCache2 = /* @__PURE__ */ new Map();
|
|
8394
|
+
const sendReport = (prop, node, value) => {
|
|
8395
|
+
if (!value) return;
|
|
8396
|
+
let tokens = deprecatedTokensCache2.get(value);
|
|
8397
|
+
if (!tokens) {
|
|
8398
|
+
tokens = getDeprecatedTokens(prop, value, context);
|
|
8399
|
+
deprecatedTokensCache2.set(value, tokens);
|
|
8400
|
+
}
|
|
8401
|
+
if (tokens.length === 0) return;
|
|
8402
|
+
tokens.forEach((token) => {
|
|
8403
|
+
context.report({
|
|
8404
|
+
node,
|
|
8405
|
+
messageId: typeof token === "string" ? "noDeprecatedTokenPaths" : "noDeprecatedTokens",
|
|
8406
|
+
data: {
|
|
8407
|
+
token: typeof token === "string" ? token : token.value,
|
|
8408
|
+
category: typeof token === "string" ? void 0 : token.category
|
|
8409
|
+
}
|
|
8410
|
+
});
|
|
8411
|
+
});
|
|
8412
|
+
};
|
|
8413
|
+
const handleLiteralOrTemplate = (prop, node) => {
|
|
8414
|
+
if (!node) return;
|
|
8415
|
+
if (isLiteral(node)) {
|
|
8416
|
+
const value = node.value?.toString();
|
|
8417
|
+
sendReport(prop, node, value);
|
|
8418
|
+
} else if (isTemplateLiteral(node) && node.expressions.length === 0) {
|
|
8419
|
+
const value = node.quasis[0].value.raw;
|
|
8420
|
+
sendReport(prop, node.quasis[0], value);
|
|
8421
|
+
}
|
|
8422
|
+
};
|
|
8423
|
+
return {
|
|
8424
|
+
JSXAttribute(node) {
|
|
8425
|
+
if (!node.value || !isPandaProp(node, context)) return;
|
|
8426
|
+
const prop = node.name.name;
|
|
8427
|
+
if (isLiteral(node.value)) {
|
|
8428
|
+
handleLiteralOrTemplate(prop, node.value);
|
|
8429
|
+
} else if (isJSXExpressionContainer(node.value)) {
|
|
8430
|
+
handleLiteralOrTemplate(prop, node.value.expression);
|
|
8431
|
+
}
|
|
8432
|
+
},
|
|
8433
|
+
Property(node) {
|
|
8434
|
+
if (!isIdentifier(node.key) || !isNodeOfTypes([AST_NODE_TYPES2.Literal, AST_NODE_TYPES2.TemplateLiteral])(node.value) || !isPandaAttribute(node, context) || isRecipeVariant(node, context)) {
|
|
8435
|
+
return;
|
|
8436
|
+
}
|
|
8437
|
+
const prop = node.key.name;
|
|
8438
|
+
handleLiteralOrTemplate(prop, node.value);
|
|
8439
|
+
},
|
|
8440
|
+
TaggedTemplateExpression(node) {
|
|
8441
|
+
const caller = getTaggedTemplateCaller(node);
|
|
8442
|
+
if (!caller || !isPandaIsh(caller, context)) return;
|
|
8443
|
+
const quasis = node.quasi.quasis;
|
|
8444
|
+
quasis.forEach((quasi) => {
|
|
8445
|
+
const styles = quasi.value.raw;
|
|
8446
|
+
if (!styles) return;
|
|
8447
|
+
let tokens = deprecatedTokensCache2.get(styles);
|
|
8448
|
+
if (!tokens) {
|
|
8449
|
+
tokens = getDeprecatedTokens("", styles, context);
|
|
8450
|
+
deprecatedTokensCache2.set(styles, tokens);
|
|
8451
|
+
}
|
|
8452
|
+
if (tokens.length === 0) return;
|
|
8453
|
+
tokens.forEach((token) => {
|
|
8454
|
+
const tokenValue = typeof token === "string" ? token : token.value;
|
|
8455
|
+
let index = styles.indexOf(tokenValue);
|
|
8456
|
+
while (index !== -1) {
|
|
8457
|
+
const start = quasi.range[0] + index + 1;
|
|
8458
|
+
const end = start + tokenValue.length;
|
|
8459
|
+
context.report({
|
|
8460
|
+
loc: {
|
|
8461
|
+
start: context.sourceCode.getLocFromIndex(start),
|
|
8462
|
+
end: context.sourceCode.getLocFromIndex(end)
|
|
8463
|
+
},
|
|
8464
|
+
messageId: typeof token === "string" ? "noDeprecatedTokenPaths" : "noDeprecatedTokens",
|
|
8465
|
+
data: {
|
|
8466
|
+
token: tokenValue,
|
|
8467
|
+
category: typeof token === "string" ? void 0 : token.category
|
|
8468
|
+
}
|
|
8469
|
+
});
|
|
8470
|
+
index = styles.indexOf(tokenValue, index + tokenValue.length);
|
|
8471
|
+
}
|
|
8472
|
+
});
|
|
8473
|
+
});
|
|
8474
|
+
}
|
|
8475
|
+
};
|
|
8476
|
+
}
|
|
8477
|
+
});
|
|
8478
|
+
no_deprecated_tokens_default = rule4;
|
|
8479
|
+
}
|
|
8480
|
+
});
|
|
8481
|
+
|
|
8353
8482
|
// src/rules/no-dynamic-styling.ts
|
|
8354
8483
|
import "@typescript-eslint/utils";
|
|
8355
|
-
var
|
|
8484
|
+
var RULE_NAME5, rule5, no_dynamic_styling_default;
|
|
8356
8485
|
var init_no_dynamic_styling = __esm({
|
|
8357
8486
|
"src/rules/no-dynamic-styling.ts"() {
|
|
8358
8487
|
"use strict";
|
|
@@ -8360,9 +8489,9 @@ var init_no_dynamic_styling = __esm({
|
|
|
8360
8489
|
init_utils();
|
|
8361
8490
|
init_helpers();
|
|
8362
8491
|
init_nodes();
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
name:
|
|
8492
|
+
RULE_NAME5 = "no-dynamic-styling";
|
|
8493
|
+
rule5 = createRule({
|
|
8494
|
+
name: RULE_NAME5,
|
|
8366
8495
|
meta: {
|
|
8367
8496
|
docs: {
|
|
8368
8497
|
description: "Ensure users don't use dynamic styling. Prefer static styles, leverage CSS variables, or recipes for known dynamic styles."
|
|
@@ -8439,14 +8568,14 @@ var init_no_dynamic_styling = __esm({
|
|
|
8439
8568
|
};
|
|
8440
8569
|
}
|
|
8441
8570
|
});
|
|
8442
|
-
no_dynamic_styling_default =
|
|
8571
|
+
no_dynamic_styling_default = rule5;
|
|
8443
8572
|
}
|
|
8444
8573
|
});
|
|
8445
8574
|
|
|
8446
8575
|
// src/rules/no-escape-hatch.ts
|
|
8447
8576
|
import { getArbitraryValue } from "@pandacss/shared";
|
|
8448
8577
|
import "@typescript-eslint/utils";
|
|
8449
|
-
var
|
|
8578
|
+
var RULE_NAME6, rule6, no_escape_hatch_default;
|
|
8450
8579
|
var init_no_escape_hatch = __esm({
|
|
8451
8580
|
"src/rules/no-escape-hatch.ts"() {
|
|
8452
8581
|
"use strict";
|
|
@@ -8454,9 +8583,9 @@ var init_no_escape_hatch = __esm({
|
|
|
8454
8583
|
init_helpers();
|
|
8455
8584
|
init_utils();
|
|
8456
8585
|
init_nodes();
|
|
8457
|
-
|
|
8458
|
-
|
|
8459
|
-
name:
|
|
8586
|
+
RULE_NAME6 = "no-escape-hatch";
|
|
8587
|
+
rule6 = createRule({
|
|
8588
|
+
name: RULE_NAME6,
|
|
8460
8589
|
meta: {
|
|
8461
8590
|
docs: {
|
|
8462
8591
|
description: "Prohibit the use of escape hatch syntax in the code."
|
|
@@ -8530,13 +8659,13 @@ var init_no_escape_hatch = __esm({
|
|
|
8530
8659
|
};
|
|
8531
8660
|
}
|
|
8532
8661
|
});
|
|
8533
|
-
no_escape_hatch_default =
|
|
8662
|
+
no_escape_hatch_default = rule6;
|
|
8534
8663
|
}
|
|
8535
8664
|
});
|
|
8536
8665
|
|
|
8537
8666
|
// src/rules/no-hardcoded-color.ts
|
|
8538
8667
|
import "@typescript-eslint/utils";
|
|
8539
|
-
var
|
|
8668
|
+
var RULE_NAME7, rule7, no_hardcoded_color_default;
|
|
8540
8669
|
var init_no_hardcoded_color = __esm({
|
|
8541
8670
|
"src/rules/no-hardcoded-color.ts"() {
|
|
8542
8671
|
"use strict";
|
|
@@ -8544,9 +8673,9 @@ var init_no_hardcoded_color = __esm({
|
|
|
8544
8673
|
init_helpers();
|
|
8545
8674
|
init_utils();
|
|
8546
8675
|
init_nodes();
|
|
8547
|
-
|
|
8548
|
-
|
|
8549
|
-
name:
|
|
8676
|
+
RULE_NAME7 = "no-hardcoded-color";
|
|
8677
|
+
rule7 = createRule({
|
|
8678
|
+
name: RULE_NAME7,
|
|
8550
8679
|
meta: {
|
|
8551
8680
|
docs: {
|
|
8552
8681
|
description: "Enforce the exclusive use of design tokens as values for colors within the codebase."
|
|
@@ -8666,14 +8795,14 @@ var init_no_hardcoded_color = __esm({
|
|
|
8666
8795
|
};
|
|
8667
8796
|
}
|
|
8668
8797
|
});
|
|
8669
|
-
no_hardcoded_color_default =
|
|
8798
|
+
no_hardcoded_color_default = rule7;
|
|
8670
8799
|
}
|
|
8671
8800
|
});
|
|
8672
8801
|
|
|
8673
8802
|
// src/rules/no-important.ts
|
|
8674
8803
|
import { getArbitraryValue as getArbitraryValue2 } from "@pandacss/shared";
|
|
8675
8804
|
import "@typescript-eslint/utils";
|
|
8676
|
-
var exclamationRegex, importantRegex,
|
|
8805
|
+
var exclamationRegex, importantRegex, RULE_NAME8, rule8, no_important_default;
|
|
8677
8806
|
var init_no_important = __esm({
|
|
8678
8807
|
"src/rules/no-important.ts"() {
|
|
8679
8808
|
"use strict";
|
|
@@ -8683,9 +8812,9 @@ var init_no_important = __esm({
|
|
|
8683
8812
|
init_nodes();
|
|
8684
8813
|
exclamationRegex = /\s*!$/;
|
|
8685
8814
|
importantRegex = /\s*!important\s*$/;
|
|
8686
|
-
|
|
8687
|
-
|
|
8688
|
-
name:
|
|
8815
|
+
RULE_NAME8 = "no-important";
|
|
8816
|
+
rule8 = createRule({
|
|
8817
|
+
name: RULE_NAME8,
|
|
8689
8818
|
meta: {
|
|
8690
8819
|
docs: {
|
|
8691
8820
|
description: "Disallow usage of !important keyword. Prioritize specificity for a maintainable and predictable styling structure."
|
|
@@ -8800,13 +8929,13 @@ var init_no_important = __esm({
|
|
|
8800
8929
|
};
|
|
8801
8930
|
}
|
|
8802
8931
|
});
|
|
8803
|
-
no_important_default =
|
|
8932
|
+
no_important_default = rule8;
|
|
8804
8933
|
}
|
|
8805
8934
|
});
|
|
8806
8935
|
|
|
8807
8936
|
// src/rules/no-invalid-nesting.ts
|
|
8808
8937
|
import "@typescript-eslint/utils";
|
|
8809
|
-
var
|
|
8938
|
+
var RULE_NAME9, rule9, no_invalid_nesting_default;
|
|
8810
8939
|
var init_no_invalid_nesting = __esm({
|
|
8811
8940
|
"src/rules/no-invalid-nesting.ts"() {
|
|
8812
8941
|
"use strict";
|
|
@@ -8814,9 +8943,9 @@ var init_no_invalid_nesting = __esm({
|
|
|
8814
8943
|
init_nodes();
|
|
8815
8944
|
init_utils();
|
|
8816
8945
|
init_helpers();
|
|
8817
|
-
|
|
8818
|
-
|
|
8819
|
-
name:
|
|
8946
|
+
RULE_NAME9 = "no-invalid-nesting";
|
|
8947
|
+
rule9 = createRule({
|
|
8948
|
+
name: RULE_NAME9,
|
|
8820
8949
|
meta: {
|
|
8821
8950
|
docs: {
|
|
8822
8951
|
description: "Warn against invalid nesting. Nested styles must contain the `&` character."
|
|
@@ -8892,14 +9021,14 @@ var init_no_invalid_nesting = __esm({
|
|
|
8892
9021
|
};
|
|
8893
9022
|
}
|
|
8894
9023
|
});
|
|
8895
|
-
no_invalid_nesting_default =
|
|
9024
|
+
no_invalid_nesting_default = rule9;
|
|
8896
9025
|
}
|
|
8897
9026
|
});
|
|
8898
9027
|
|
|
8899
9028
|
// src/rules/no-invalid-token-paths.ts
|
|
8900
|
-
import { AST_NODE_TYPES as
|
|
8901
|
-
import { isNodeOfTypes } from "@typescript-eslint/utils/ast-utils";
|
|
8902
|
-
var
|
|
9029
|
+
import { AST_NODE_TYPES as AST_NODE_TYPES3 } from "@typescript-eslint/utils";
|
|
9030
|
+
import { isNodeOfTypes as isNodeOfTypes2 } from "@typescript-eslint/utils/ast-utils";
|
|
9031
|
+
var RULE_NAME10, rule10, no_invalid_token_paths_default;
|
|
8903
9032
|
var init_no_invalid_token_paths = __esm({
|
|
8904
9033
|
"src/rules/no-invalid-token-paths.ts"() {
|
|
8905
9034
|
"use strict";
|
|
@@ -8907,9 +9036,9 @@ var init_no_invalid_token_paths = __esm({
|
|
|
8907
9036
|
init_helpers();
|
|
8908
9037
|
init_utils();
|
|
8909
9038
|
init_nodes();
|
|
8910
|
-
|
|
8911
|
-
|
|
8912
|
-
name:
|
|
9039
|
+
RULE_NAME10 = "no-invalid-token-paths";
|
|
9040
|
+
rule10 = createRule({
|
|
9041
|
+
name: RULE_NAME10,
|
|
8913
9042
|
meta: {
|
|
8914
9043
|
docs: {
|
|
8915
9044
|
description: "Disallow the use of invalid token paths within token function syntax."
|
|
@@ -8959,7 +9088,7 @@ var init_no_invalid_token_paths = __esm({
|
|
|
8959
9088
|
}
|
|
8960
9089
|
},
|
|
8961
9090
|
Property(node) {
|
|
8962
|
-
if (!isIdentifier(node.key) || !
|
|
9091
|
+
if (!isIdentifier(node.key) || !isNodeOfTypes2([AST_NODE_TYPES3.Literal, AST_NODE_TYPES3.TemplateLiteral])(node.value) || !isPandaAttribute(node, context) || isRecipeVariant(node, context)) {
|
|
8963
9092
|
return;
|
|
8964
9093
|
}
|
|
8965
9094
|
handleLiteralOrTemplate(node.value);
|
|
@@ -8998,12 +9127,12 @@ var init_no_invalid_token_paths = __esm({
|
|
|
8998
9127
|
};
|
|
8999
9128
|
}
|
|
9000
9129
|
});
|
|
9001
|
-
no_invalid_token_paths_default =
|
|
9130
|
+
no_invalid_token_paths_default = rule10;
|
|
9002
9131
|
}
|
|
9003
9132
|
});
|
|
9004
9133
|
|
|
9005
9134
|
// src/rules/no-margin-properties.ts
|
|
9006
|
-
var
|
|
9135
|
+
var RULE_NAME11, rule11, no_margin_properties_default;
|
|
9007
9136
|
var init_no_margin_properties = __esm({
|
|
9008
9137
|
"src/rules/no-margin-properties.ts"() {
|
|
9009
9138
|
"use strict";
|
|
@@ -9011,9 +9140,9 @@ var init_no_margin_properties = __esm({
|
|
|
9011
9140
|
init_helpers();
|
|
9012
9141
|
init_utils();
|
|
9013
9142
|
init_nodes();
|
|
9014
|
-
|
|
9015
|
-
|
|
9016
|
-
name:
|
|
9143
|
+
RULE_NAME11 = "no-margin-properties";
|
|
9144
|
+
rule11 = createRule({
|
|
9145
|
+
name: RULE_NAME11,
|
|
9017
9146
|
meta: {
|
|
9018
9147
|
docs: {
|
|
9019
9148
|
description: "Discourage using margin properties for spacing; prefer defining spacing in parent elements with `flex` or `grid` using the `gap` property for a more resilient layout. Margins make components less reusable in other contexts."
|
|
@@ -9110,12 +9239,12 @@ var init_no_margin_properties = __esm({
|
|
|
9110
9239
|
};
|
|
9111
9240
|
}
|
|
9112
9241
|
});
|
|
9113
|
-
no_margin_properties_default =
|
|
9242
|
+
no_margin_properties_default = rule11;
|
|
9114
9243
|
}
|
|
9115
9244
|
});
|
|
9116
9245
|
|
|
9117
9246
|
// src/utils/physical-properties.ts
|
|
9118
|
-
var physicalProperties;
|
|
9247
|
+
var physicalProperties, physicalPropertyValues;
|
|
9119
9248
|
var init_physical_properties = __esm({
|
|
9120
9249
|
"src/utils/physical-properties.ts"() {
|
|
9121
9250
|
"use strict";
|
|
@@ -9154,11 +9283,18 @@ var init_physical_properties = __esm({
|
|
|
9154
9283
|
top: "insetBlockStart",
|
|
9155
9284
|
bottom: "insetBlockEnd"
|
|
9156
9285
|
};
|
|
9286
|
+
physicalPropertyValues = {
|
|
9287
|
+
// text-align physical values mapped to logical values
|
|
9288
|
+
textAlign: {
|
|
9289
|
+
left: "start",
|
|
9290
|
+
right: "end"
|
|
9291
|
+
}
|
|
9292
|
+
};
|
|
9157
9293
|
}
|
|
9158
9294
|
});
|
|
9159
9295
|
|
|
9160
9296
|
// src/rules/no-physical-properties.ts
|
|
9161
|
-
var
|
|
9297
|
+
var RULE_NAME12, MESSAGES, PropertyCache, extractStringLiteralValue, createPropertyReport, createValueReport, rule12, no_physical_properties_default;
|
|
9162
9298
|
var init_no_physical_properties = __esm({
|
|
9163
9299
|
"src/rules/no-physical-properties.ts"() {
|
|
9164
9300
|
"use strict";
|
|
@@ -9167,17 +9303,103 @@ var init_no_physical_properties = __esm({
|
|
|
9167
9303
|
init_utils();
|
|
9168
9304
|
init_nodes();
|
|
9169
9305
|
init_physical_properties();
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9306
|
+
RULE_NAME12 = "no-physical-properties";
|
|
9307
|
+
MESSAGES = {
|
|
9308
|
+
physical: "Use logical property instead of {{physical}}. Prefer `{{logical}}`.",
|
|
9309
|
+
physicalValue: "Use logical value instead of {{physical}}. Prefer `{{logical}}`.",
|
|
9310
|
+
replace: "Replace `{{physical}}` with `{{logical}}`."
|
|
9311
|
+
};
|
|
9312
|
+
PropertyCache = class {
|
|
9313
|
+
longhandCache = /* @__PURE__ */ new Map();
|
|
9314
|
+
pandaPropCache = /* @__PURE__ */ new WeakMap();
|
|
9315
|
+
pandaAttributeCache = /* @__PURE__ */ new WeakMap();
|
|
9316
|
+
recipeVariantCache = /* @__PURE__ */ new WeakMap();
|
|
9317
|
+
getLonghand(name2, context) {
|
|
9318
|
+
if (this.longhandCache.has(name2)) {
|
|
9319
|
+
return this.longhandCache.get(name2);
|
|
9320
|
+
}
|
|
9321
|
+
const longhand = resolveLonghand(name2, context) ?? name2;
|
|
9322
|
+
this.longhandCache.set(name2, longhand);
|
|
9323
|
+
return longhand;
|
|
9324
|
+
}
|
|
9325
|
+
isPandaProp(node, context) {
|
|
9326
|
+
if (this.pandaPropCache.has(node)) {
|
|
9327
|
+
return this.pandaPropCache.get(node);
|
|
9328
|
+
}
|
|
9329
|
+
const result = isPandaProp(node, context);
|
|
9330
|
+
this.pandaPropCache.set(node, result);
|
|
9331
|
+
return !!result;
|
|
9332
|
+
}
|
|
9333
|
+
isPandaAttribute(node, context) {
|
|
9334
|
+
if (this.pandaAttributeCache.has(node)) {
|
|
9335
|
+
return this.pandaAttributeCache.get(node);
|
|
9336
|
+
}
|
|
9337
|
+
const result = isPandaAttribute(node, context);
|
|
9338
|
+
this.pandaAttributeCache.set(node, result);
|
|
9339
|
+
return !!result;
|
|
9340
|
+
}
|
|
9341
|
+
isRecipeVariant(node, context) {
|
|
9342
|
+
if (this.recipeVariantCache.has(node)) {
|
|
9343
|
+
return this.recipeVariantCache.get(node);
|
|
9344
|
+
}
|
|
9345
|
+
const result = isRecipeVariant(node, context);
|
|
9346
|
+
this.recipeVariantCache.set(node, result);
|
|
9347
|
+
return !!result;
|
|
9348
|
+
}
|
|
9349
|
+
};
|
|
9350
|
+
extractStringLiteralValue = (valueNode) => {
|
|
9351
|
+
if (isLiteral(valueNode) && typeof valueNode.value === "string") {
|
|
9352
|
+
return valueNode.value;
|
|
9353
|
+
}
|
|
9354
|
+
if (isJSXExpressionContainer(valueNode) && isLiteral(valueNode.expression) && typeof valueNode.expression.value === "string") {
|
|
9355
|
+
return valueNode.expression.value;
|
|
9356
|
+
}
|
|
9357
|
+
return null;
|
|
9358
|
+
};
|
|
9359
|
+
createPropertyReport = (node, longhandName, logical, context) => {
|
|
9360
|
+
const physicalName = `\`${node.name}\`${longhandName !== node.name ? ` (resolved to \`${longhandName}\`)` : ""}`;
|
|
9361
|
+
context.report({
|
|
9362
|
+
node,
|
|
9363
|
+
messageId: "physical",
|
|
9364
|
+
data: { physical: physicalName, logical },
|
|
9365
|
+
suggest: [
|
|
9366
|
+
{
|
|
9367
|
+
messageId: "replace",
|
|
9368
|
+
data: { physical: node.name, logical },
|
|
9369
|
+
fix: (fixer) => fixer.replaceText(node, logical)
|
|
9370
|
+
}
|
|
9371
|
+
]
|
|
9372
|
+
});
|
|
9373
|
+
};
|
|
9374
|
+
createValueReport = (valueNode, valueText, logical, context) => {
|
|
9375
|
+
context.report({
|
|
9376
|
+
node: valueNode,
|
|
9377
|
+
messageId: "physicalValue",
|
|
9378
|
+
data: { physical: `"${valueText}"`, logical: `"${logical}"` },
|
|
9379
|
+
suggest: [
|
|
9380
|
+
{
|
|
9381
|
+
messageId: "replace",
|
|
9382
|
+
data: { physical: `"${valueText}"`, logical: `"${logical}"` },
|
|
9383
|
+
fix: (fixer) => {
|
|
9384
|
+
if (isLiteral(valueNode)) {
|
|
9385
|
+
return fixer.replaceText(valueNode, `"${logical}"`);
|
|
9386
|
+
}
|
|
9387
|
+
if (isJSXExpressionContainer(valueNode) && isLiteral(valueNode.expression)) {
|
|
9388
|
+
return fixer.replaceText(valueNode.expression, `"${logical}"`);
|
|
9389
|
+
}
|
|
9390
|
+
return null;
|
|
9391
|
+
}
|
|
9392
|
+
}
|
|
9393
|
+
]
|
|
9394
|
+
});
|
|
9395
|
+
};
|
|
9396
|
+
rule12 = createRule({
|
|
9397
|
+
name: RULE_NAME12,
|
|
9173
9398
|
meta: {
|
|
9174
9399
|
docs: {
|
|
9175
9400
|
description: "Encourage the use of logical properties over physical properties to foster a responsive and adaptable user interface."
|
|
9176
9401
|
},
|
|
9177
|
-
messages:
|
|
9178
|
-
physical: "Use logical property instead of {{physical}}. Prefer `{{logical}}`.",
|
|
9179
|
-
replace: "Replace `{{physical}}` with `{{logical}}`."
|
|
9180
|
-
},
|
|
9402
|
+
messages: MESSAGES,
|
|
9181
9403
|
type: "suggestion",
|
|
9182
9404
|
hasSuggestions: true,
|
|
9183
9405
|
schema: [
|
|
@@ -9197,97 +9419,54 @@ var init_no_physical_properties = __esm({
|
|
|
9197
9419
|
}
|
|
9198
9420
|
]
|
|
9199
9421
|
},
|
|
9200
|
-
defaultOptions: [
|
|
9201
|
-
{
|
|
9202
|
-
whitelist: []
|
|
9203
|
-
}
|
|
9204
|
-
],
|
|
9422
|
+
defaultOptions: [{ whitelist: [] }],
|
|
9205
9423
|
create(context) {
|
|
9206
9424
|
const whitelist = context.options[0]?.whitelist ?? [];
|
|
9207
|
-
const
|
|
9208
|
-
const
|
|
9209
|
-
const pandaAttributeCache = /* @__PURE__ */ new WeakMap();
|
|
9210
|
-
const recipeVariantCache = /* @__PURE__ */ new WeakMap();
|
|
9211
|
-
const getLonghand = (name2) => {
|
|
9212
|
-
if (longhandCache.has(name2)) {
|
|
9213
|
-
return longhandCache.get(name2);
|
|
9214
|
-
}
|
|
9215
|
-
const longhand = resolveLonghand(name2, context) ?? name2;
|
|
9216
|
-
longhandCache.set(name2, longhand);
|
|
9217
|
-
return longhand;
|
|
9218
|
-
};
|
|
9219
|
-
const isCachedPandaProp = (node) => {
|
|
9220
|
-
if (pandaPropCache.has(node)) {
|
|
9221
|
-
return pandaPropCache.get(node);
|
|
9222
|
-
}
|
|
9223
|
-
const result = isPandaProp(node, context);
|
|
9224
|
-
pandaPropCache.set(node, result);
|
|
9225
|
-
return !!result;
|
|
9226
|
-
};
|
|
9227
|
-
const isCachedPandaAttribute = (node) => {
|
|
9228
|
-
if (pandaAttributeCache.has(node)) {
|
|
9229
|
-
return pandaAttributeCache.get(node);
|
|
9230
|
-
}
|
|
9231
|
-
const result = isPandaAttribute(node, context);
|
|
9232
|
-
pandaAttributeCache.set(node, result);
|
|
9233
|
-
return !!result;
|
|
9234
|
-
};
|
|
9235
|
-
const isCachedRecipeVariant = (node) => {
|
|
9236
|
-
if (recipeVariantCache.has(node)) {
|
|
9237
|
-
return recipeVariantCache.get(node);
|
|
9238
|
-
}
|
|
9239
|
-
const result = isRecipeVariant(node, context);
|
|
9240
|
-
recipeVariantCache.set(node, result);
|
|
9241
|
-
return !!result;
|
|
9242
|
-
};
|
|
9243
|
-
const sendReport = (node) => {
|
|
9425
|
+
const cache = new PropertyCache();
|
|
9426
|
+
const checkPropertyName = (node) => {
|
|
9244
9427
|
if (whitelist.includes(node.name)) return;
|
|
9245
|
-
const longhandName = getLonghand(node.name);
|
|
9428
|
+
const longhandName = cache.getLonghand(node.name, context);
|
|
9246
9429
|
if (!(longhandName in physicalProperties)) return;
|
|
9247
9430
|
const logical = physicalProperties[longhandName];
|
|
9248
|
-
|
|
9249
|
-
|
|
9250
|
-
|
|
9251
|
-
|
|
9252
|
-
|
|
9253
|
-
|
|
9254
|
-
|
|
9255
|
-
|
|
9256
|
-
|
|
9257
|
-
|
|
9258
|
-
|
|
9259
|
-
data: {
|
|
9260
|
-
physical: node.name,
|
|
9261
|
-
logical
|
|
9262
|
-
},
|
|
9263
|
-
fix: (fixer) => {
|
|
9264
|
-
return fixer.replaceText(node, logical);
|
|
9265
|
-
}
|
|
9266
|
-
}
|
|
9267
|
-
]
|
|
9268
|
-
});
|
|
9431
|
+
createPropertyReport(node, longhandName, logical, context);
|
|
9432
|
+
};
|
|
9433
|
+
const checkPropertyValue = (keyNode, valueNode) => {
|
|
9434
|
+
const propName = keyNode.name;
|
|
9435
|
+
if (!(propName in physicalPropertyValues)) return false;
|
|
9436
|
+
const valueText = extractStringLiteralValue(valueNode);
|
|
9437
|
+
if (valueText === null) return false;
|
|
9438
|
+
const valueMap = physicalPropertyValues[propName];
|
|
9439
|
+
if (!valueMap[valueText]) return false;
|
|
9440
|
+
createValueReport(valueNode, valueText, valueMap[valueText], context);
|
|
9441
|
+
return true;
|
|
9269
9442
|
};
|
|
9270
9443
|
return {
|
|
9271
9444
|
JSXAttribute(node) {
|
|
9272
9445
|
if (!isJSXIdentifier(node.name)) return;
|
|
9273
|
-
if (!
|
|
9274
|
-
|
|
9446
|
+
if (!cache.isPandaProp(node, context)) return;
|
|
9447
|
+
checkPropertyName(node.name);
|
|
9448
|
+
if (node.value) {
|
|
9449
|
+
checkPropertyValue(node.name, node.value);
|
|
9450
|
+
}
|
|
9275
9451
|
},
|
|
9276
9452
|
Property(node) {
|
|
9277
9453
|
if (!isIdentifier(node.key)) return;
|
|
9278
|
-
if (!
|
|
9279
|
-
if (
|
|
9280
|
-
|
|
9454
|
+
if (!cache.isPandaAttribute(node, context)) return;
|
|
9455
|
+
if (cache.isRecipeVariant(node, context)) return;
|
|
9456
|
+
checkPropertyName(node.key);
|
|
9457
|
+
if (node.value) {
|
|
9458
|
+
checkPropertyValue(node.key, node.value);
|
|
9459
|
+
}
|
|
9281
9460
|
}
|
|
9282
9461
|
};
|
|
9283
9462
|
}
|
|
9284
9463
|
});
|
|
9285
|
-
no_physical_properties_default =
|
|
9464
|
+
no_physical_properties_default = rule12;
|
|
9286
9465
|
}
|
|
9287
9466
|
});
|
|
9288
9467
|
|
|
9289
9468
|
// src/rules/no-property-renaming.ts
|
|
9290
|
-
var
|
|
9469
|
+
var RULE_NAME13, rule13, no_property_renaming_default;
|
|
9291
9470
|
var init_no_property_renaming = __esm({
|
|
9292
9471
|
"src/rules/no-property-renaming.ts"() {
|
|
9293
9472
|
"use strict";
|
|
@@ -9295,9 +9474,9 @@ var init_no_property_renaming = __esm({
|
|
|
9295
9474
|
init_utils();
|
|
9296
9475
|
init_helpers();
|
|
9297
9476
|
init_nodes();
|
|
9298
|
-
|
|
9299
|
-
|
|
9300
|
-
name:
|
|
9477
|
+
RULE_NAME13 = "no-property-renaming";
|
|
9478
|
+
rule13 = createRule({
|
|
9479
|
+
name: RULE_NAME13,
|
|
9301
9480
|
meta: {
|
|
9302
9481
|
docs: {
|
|
9303
9482
|
description: "Ensure that properties for patterns or style props are not renamed, as it prevents proper tracking."
|
|
@@ -9375,14 +9554,14 @@ var init_no_property_renaming = __esm({
|
|
|
9375
9554
|
};
|
|
9376
9555
|
}
|
|
9377
9556
|
});
|
|
9378
|
-
no_property_renaming_default =
|
|
9557
|
+
no_property_renaming_default = rule13;
|
|
9379
9558
|
}
|
|
9380
9559
|
});
|
|
9381
9560
|
|
|
9382
9561
|
// src/rules/no-unsafe-token-fn-usage.ts
|
|
9383
9562
|
import "@typescript-eslint/utils";
|
|
9384
9563
|
import { getArbitraryValue as getArbitraryValue3 } from "@pandacss/shared";
|
|
9385
|
-
var
|
|
9564
|
+
var RULE_NAME14, rule14, no_unsafe_token_fn_usage_default;
|
|
9386
9565
|
var init_no_unsafe_token_fn_usage = __esm({
|
|
9387
9566
|
"src/rules/no-unsafe-token-fn-usage.ts"() {
|
|
9388
9567
|
"use strict";
|
|
@@ -9390,9 +9569,9 @@ var init_no_unsafe_token_fn_usage = __esm({
|
|
|
9390
9569
|
init_helpers();
|
|
9391
9570
|
init_utils();
|
|
9392
9571
|
init_nodes();
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
name:
|
|
9572
|
+
RULE_NAME14 = "no-unsafe-token-fn-usage";
|
|
9573
|
+
rule14 = createRule({
|
|
9574
|
+
name: RULE_NAME14,
|
|
9396
9575
|
meta: {
|
|
9397
9576
|
docs: {
|
|
9398
9577
|
description: "Prevent users from using the token function in situations where they could simply use the raw design token."
|
|
@@ -9517,12 +9696,12 @@ var init_no_unsafe_token_fn_usage = __esm({
|
|
|
9517
9696
|
};
|
|
9518
9697
|
}
|
|
9519
9698
|
});
|
|
9520
|
-
no_unsafe_token_fn_usage_default =
|
|
9699
|
+
no_unsafe_token_fn_usage_default = rule14;
|
|
9521
9700
|
}
|
|
9522
9701
|
});
|
|
9523
9702
|
|
|
9524
9703
|
// src/rules/prefer-longhand-properties.ts
|
|
9525
|
-
var
|
|
9704
|
+
var RULE_NAME15, rule15, prefer_longhand_properties_default;
|
|
9526
9705
|
var init_prefer_longhand_properties = __esm({
|
|
9527
9706
|
"src/rules/prefer-longhand-properties.ts"() {
|
|
9528
9707
|
"use strict";
|
|
@@ -9530,9 +9709,9 @@ var init_prefer_longhand_properties = __esm({
|
|
|
9530
9709
|
init_helpers();
|
|
9531
9710
|
init_utils();
|
|
9532
9711
|
init_nodes();
|
|
9533
|
-
|
|
9534
|
-
|
|
9535
|
-
name:
|
|
9712
|
+
RULE_NAME15 = "prefer-longhand-properties";
|
|
9713
|
+
rule15 = createRule({
|
|
9714
|
+
name: RULE_NAME15,
|
|
9536
9715
|
meta: {
|
|
9537
9716
|
docs: {
|
|
9538
9717
|
description: "Discourage the use of shorthand properties and promote the preference for longhand properties in the codebase."
|
|
@@ -9639,12 +9818,12 @@ var init_prefer_longhand_properties = __esm({
|
|
|
9639
9818
|
};
|
|
9640
9819
|
}
|
|
9641
9820
|
});
|
|
9642
|
-
prefer_longhand_properties_default =
|
|
9821
|
+
prefer_longhand_properties_default = rule15;
|
|
9643
9822
|
}
|
|
9644
9823
|
});
|
|
9645
9824
|
|
|
9646
9825
|
// src/rules/prefer-shorthand-properties.ts
|
|
9647
|
-
var
|
|
9826
|
+
var RULE_NAME16, rule16, prefer_shorthand_properties_default;
|
|
9648
9827
|
var init_prefer_shorthand_properties = __esm({
|
|
9649
9828
|
"src/rules/prefer-shorthand-properties.ts"() {
|
|
9650
9829
|
"use strict";
|
|
@@ -9652,9 +9831,9 @@ var init_prefer_shorthand_properties = __esm({
|
|
|
9652
9831
|
init_helpers();
|
|
9653
9832
|
init_utils();
|
|
9654
9833
|
init_nodes();
|
|
9655
|
-
|
|
9656
|
-
|
|
9657
|
-
name:
|
|
9834
|
+
RULE_NAME16 = "prefer-shorthand-properties";
|
|
9835
|
+
rule16 = createRule({
|
|
9836
|
+
name: RULE_NAME16,
|
|
9658
9837
|
meta: {
|
|
9659
9838
|
docs: {
|
|
9660
9839
|
description: "Discourage the use of longhand properties and promote the preference for shorthand properties in the codebase."
|
|
@@ -9773,7 +9952,7 @@ var init_prefer_shorthand_properties = __esm({
|
|
|
9773
9952
|
};
|
|
9774
9953
|
}
|
|
9775
9954
|
});
|
|
9776
|
-
prefer_shorthand_properties_default =
|
|
9955
|
+
prefer_shorthand_properties_default = rule16;
|
|
9777
9956
|
}
|
|
9778
9957
|
});
|
|
9779
9958
|
|
|
@@ -9898,7 +10077,7 @@ var init_composite_properties = __esm({
|
|
|
9898
10077
|
});
|
|
9899
10078
|
|
|
9900
10079
|
// src/rules/prefer-atomic-properties.ts
|
|
9901
|
-
var
|
|
10080
|
+
var RULE_NAME17, rule17, prefer_atomic_properties_default;
|
|
9902
10081
|
var init_prefer_atomic_properties = __esm({
|
|
9903
10082
|
"src/rules/prefer-atomic-properties.ts"() {
|
|
9904
10083
|
"use strict";
|
|
@@ -9907,9 +10086,9 @@ var init_prefer_atomic_properties = __esm({
|
|
|
9907
10086
|
init_helpers();
|
|
9908
10087
|
init_composite_properties();
|
|
9909
10088
|
init_nodes();
|
|
9910
|
-
|
|
9911
|
-
|
|
9912
|
-
name:
|
|
10089
|
+
RULE_NAME17 = "prefer-atomic-properties";
|
|
10090
|
+
rule17 = createRule({
|
|
10091
|
+
name: RULE_NAME17,
|
|
9913
10092
|
meta: {
|
|
9914
10093
|
docs: {
|
|
9915
10094
|
description: "Encourage the use of atomic properties instead of composite properties in the codebase."
|
|
@@ -10026,12 +10205,12 @@ var init_prefer_atomic_properties = __esm({
|
|
|
10026
10205
|
};
|
|
10027
10206
|
}
|
|
10028
10207
|
});
|
|
10029
|
-
prefer_atomic_properties_default =
|
|
10208
|
+
prefer_atomic_properties_default = rule17;
|
|
10030
10209
|
}
|
|
10031
10210
|
});
|
|
10032
10211
|
|
|
10033
10212
|
// src/rules/prefer-composite-properties.ts
|
|
10034
|
-
var
|
|
10213
|
+
var RULE_NAME18, rule18, prefer_composite_properties_default;
|
|
10035
10214
|
var init_prefer_composite_properties = __esm({
|
|
10036
10215
|
"src/rules/prefer-composite-properties.ts"() {
|
|
10037
10216
|
"use strict";
|
|
@@ -10040,9 +10219,9 @@ var init_prefer_composite_properties = __esm({
|
|
|
10040
10219
|
init_utils();
|
|
10041
10220
|
init_composite_properties();
|
|
10042
10221
|
init_nodes();
|
|
10043
|
-
|
|
10044
|
-
|
|
10045
|
-
name:
|
|
10222
|
+
RULE_NAME18 = "prefer-composite-properties";
|
|
10223
|
+
rule18 = createRule({
|
|
10224
|
+
name: RULE_NAME18,
|
|
10046
10225
|
meta: {
|
|
10047
10226
|
docs: {
|
|
10048
10227
|
description: "Encourage the use of composite properties instead of atomic properties in the codebase."
|
|
@@ -10155,12 +10334,12 @@ var init_prefer_composite_properties = __esm({
|
|
|
10155
10334
|
};
|
|
10156
10335
|
}
|
|
10157
10336
|
});
|
|
10158
|
-
prefer_composite_properties_default =
|
|
10337
|
+
prefer_composite_properties_default = rule18;
|
|
10159
10338
|
}
|
|
10160
10339
|
});
|
|
10161
10340
|
|
|
10162
10341
|
// src/rules/prefer-unified-property-style.ts
|
|
10163
|
-
var
|
|
10342
|
+
var RULE_NAME19, rule19, prefer_unified_property_style_default;
|
|
10164
10343
|
var init_prefer_unified_property_style = __esm({
|
|
10165
10344
|
"src/rules/prefer-unified-property-style.ts"() {
|
|
10166
10345
|
"use strict";
|
|
@@ -10169,9 +10348,9 @@ var init_prefer_unified_property_style = __esm({
|
|
|
10169
10348
|
init_utils();
|
|
10170
10349
|
init_composite_properties();
|
|
10171
10350
|
init_nodes();
|
|
10172
|
-
|
|
10173
|
-
|
|
10174
|
-
name:
|
|
10351
|
+
RULE_NAME19 = "prefer-unified-property-style";
|
|
10352
|
+
rule19 = createRule({
|
|
10353
|
+
name: RULE_NAME19,
|
|
10175
10354
|
meta: {
|
|
10176
10355
|
docs: {
|
|
10177
10356
|
description: "Discourage mixing atomic and composite forms of the same property in a style declaration. Atomic styles give more consistent results."
|
|
@@ -10277,7 +10456,7 @@ var init_prefer_unified_property_style = __esm({
|
|
|
10277
10456
|
};
|
|
10278
10457
|
}
|
|
10279
10458
|
});
|
|
10280
|
-
prefer_unified_property_style_default =
|
|
10459
|
+
prefer_unified_property_style_default = rule19;
|
|
10281
10460
|
}
|
|
10282
10461
|
});
|
|
10283
10462
|
|
|
@@ -10290,6 +10469,7 @@ var init_rules = __esm({
|
|
|
10290
10469
|
init_file_not_included();
|
|
10291
10470
|
init_no_config_function_in_source();
|
|
10292
10471
|
init_no_debug();
|
|
10472
|
+
init_no_deprecated_tokens();
|
|
10293
10473
|
init_no_dynamic_styling();
|
|
10294
10474
|
init_no_escape_hatch();
|
|
10295
10475
|
init_no_hardcoded_color();
|
|
@@ -10309,21 +10489,22 @@ var init_rules = __esm({
|
|
|
10309
10489
|
[RULE_NAME]: file_not_included_default,
|
|
10310
10490
|
[RULE_NAME2]: no_config_function_in_source_default,
|
|
10311
10491
|
[RULE_NAME3]: no_debug_default,
|
|
10312
|
-
[RULE_NAME4]:
|
|
10313
|
-
[RULE_NAME5]:
|
|
10314
|
-
[RULE_NAME6]:
|
|
10315
|
-
[RULE_NAME7]:
|
|
10316
|
-
[
|
|
10317
|
-
[
|
|
10318
|
-
[
|
|
10319
|
-
[RULE_NAME11]:
|
|
10320
|
-
[RULE_NAME12]:
|
|
10321
|
-
[RULE_NAME13]:
|
|
10322
|
-
[RULE_NAME14]:
|
|
10323
|
-
[RULE_NAME15]:
|
|
10324
|
-
[RULE_NAME16]:
|
|
10325
|
-
[RULE_NAME17]:
|
|
10326
|
-
[RULE_NAME18]:
|
|
10492
|
+
[RULE_NAME4]: no_deprecated_tokens_default,
|
|
10493
|
+
[RULE_NAME5]: no_dynamic_styling_default,
|
|
10494
|
+
[RULE_NAME6]: no_escape_hatch_default,
|
|
10495
|
+
[RULE_NAME7]: no_hardcoded_color_default,
|
|
10496
|
+
[RULE_NAME8]: no_important_default,
|
|
10497
|
+
[RULE_NAME10]: no_invalid_token_paths_default,
|
|
10498
|
+
[RULE_NAME9]: no_invalid_nesting_default,
|
|
10499
|
+
[RULE_NAME11]: no_margin_properties_default,
|
|
10500
|
+
[RULE_NAME12]: no_physical_properties_default,
|
|
10501
|
+
[RULE_NAME13]: no_property_renaming_default,
|
|
10502
|
+
[RULE_NAME14]: no_unsafe_token_fn_usage_default,
|
|
10503
|
+
[RULE_NAME15]: prefer_longhand_properties_default,
|
|
10504
|
+
[RULE_NAME16]: prefer_shorthand_properties_default,
|
|
10505
|
+
[RULE_NAME17]: prefer_atomic_properties_default,
|
|
10506
|
+
[RULE_NAME18]: prefer_composite_properties_default,
|
|
10507
|
+
[RULE_NAME19]: prefer_unified_property_style_default
|
|
10327
10508
|
};
|
|
10328
10509
|
}
|
|
10329
10510
|
});
|
|
@@ -10338,7 +10519,7 @@ var init_all = __esm({
|
|
|
10338
10519
|
init_file_not_included();
|
|
10339
10520
|
init_no_config_function_in_source();
|
|
10340
10521
|
init_no_invalid_token_paths();
|
|
10341
|
-
errorRules = [RULE_NAME, RULE_NAME2,
|
|
10522
|
+
errorRules = [RULE_NAME, RULE_NAME2, RULE_NAME10];
|
|
10342
10523
|
allRules = Object.fromEntries(
|
|
10343
10524
|
Object.entries(rules).map(([name2]) => {
|
|
10344
10525
|
return [`@pandacss/${name2}`, errorRules.includes(name2) ? "error" : "warn"];
|
|
@@ -10372,7 +10553,8 @@ var init_recommended = __esm({
|
|
|
10372
10553
|
"@pandacss/no-invalid-nesting": "error",
|
|
10373
10554
|
"@pandacss/no-invalid-token-paths": "error",
|
|
10374
10555
|
"@pandacss/no-property-renaming": "warn",
|
|
10375
|
-
"@pandacss/no-unsafe-token-fn-usage": "warn"
|
|
10556
|
+
"@pandacss/no-unsafe-token-fn-usage": "warn",
|
|
10557
|
+
"@pandacss/no-deprecated-tokens": "warn"
|
|
10376
10558
|
}
|
|
10377
10559
|
};
|
|
10378
10560
|
}
|