@pandacss/eslint-plugin 0.2.9 → 0.2.11
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 +379 -257
- package/dist/index.mjs +400 -268
- 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.11";
|
|
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,7 +9239,7 @@ 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
|
|
|
@@ -9165,7 +9294,7 @@ var init_physical_properties = __esm({
|
|
|
9165
9294
|
});
|
|
9166
9295
|
|
|
9167
9296
|
// src/rules/no-physical-properties.ts
|
|
9168
|
-
var
|
|
9297
|
+
var RULE_NAME12, MESSAGES, PropertyCache, extractStringLiteralValue, createPropertyReport, createValueReport, rule12, no_physical_properties_default;
|
|
9169
9298
|
var init_no_physical_properties = __esm({
|
|
9170
9299
|
"src/rules/no-physical-properties.ts"() {
|
|
9171
9300
|
"use strict";
|
|
@@ -9174,7 +9303,7 @@ var init_no_physical_properties = __esm({
|
|
|
9174
9303
|
init_utils();
|
|
9175
9304
|
init_nodes();
|
|
9176
9305
|
init_physical_properties();
|
|
9177
|
-
|
|
9306
|
+
RULE_NAME12 = "no-physical-properties";
|
|
9178
9307
|
MESSAGES = {
|
|
9179
9308
|
physical: "Use logical property instead of {{physical}}. Prefer `{{logical}}`.",
|
|
9180
9309
|
physicalValue: "Use logical value instead of {{physical}}. Prefer `{{logical}}`.",
|
|
@@ -9264,8 +9393,8 @@ var init_no_physical_properties = __esm({
|
|
|
9264
9393
|
]
|
|
9265
9394
|
});
|
|
9266
9395
|
};
|
|
9267
|
-
|
|
9268
|
-
name:
|
|
9396
|
+
rule12 = createRule({
|
|
9397
|
+
name: RULE_NAME12,
|
|
9269
9398
|
meta: {
|
|
9270
9399
|
docs: {
|
|
9271
9400
|
description: "Encourage the use of logical properties over physical properties to foster a responsive and adaptable user interface."
|
|
@@ -9332,12 +9461,12 @@ var init_no_physical_properties = __esm({
|
|
|
9332
9461
|
};
|
|
9333
9462
|
}
|
|
9334
9463
|
});
|
|
9335
|
-
no_physical_properties_default =
|
|
9464
|
+
no_physical_properties_default = rule12;
|
|
9336
9465
|
}
|
|
9337
9466
|
});
|
|
9338
9467
|
|
|
9339
9468
|
// src/rules/no-property-renaming.ts
|
|
9340
|
-
var
|
|
9469
|
+
var RULE_NAME13, rule13, no_property_renaming_default;
|
|
9341
9470
|
var init_no_property_renaming = __esm({
|
|
9342
9471
|
"src/rules/no-property-renaming.ts"() {
|
|
9343
9472
|
"use strict";
|
|
@@ -9345,9 +9474,9 @@ var init_no_property_renaming = __esm({
|
|
|
9345
9474
|
init_utils();
|
|
9346
9475
|
init_helpers();
|
|
9347
9476
|
init_nodes();
|
|
9348
|
-
|
|
9349
|
-
|
|
9350
|
-
name:
|
|
9477
|
+
RULE_NAME13 = "no-property-renaming";
|
|
9478
|
+
rule13 = createRule({
|
|
9479
|
+
name: RULE_NAME13,
|
|
9351
9480
|
meta: {
|
|
9352
9481
|
docs: {
|
|
9353
9482
|
description: "Ensure that properties for patterns or style props are not renamed, as it prevents proper tracking."
|
|
@@ -9425,14 +9554,14 @@ var init_no_property_renaming = __esm({
|
|
|
9425
9554
|
};
|
|
9426
9555
|
}
|
|
9427
9556
|
});
|
|
9428
|
-
no_property_renaming_default =
|
|
9557
|
+
no_property_renaming_default = rule13;
|
|
9429
9558
|
}
|
|
9430
9559
|
});
|
|
9431
9560
|
|
|
9432
9561
|
// src/rules/no-unsafe-token-fn-usage.ts
|
|
9433
9562
|
import "@typescript-eslint/utils";
|
|
9434
9563
|
import { getArbitraryValue as getArbitraryValue3 } from "@pandacss/shared";
|
|
9435
|
-
var
|
|
9564
|
+
var RULE_NAME14, rule14, no_unsafe_token_fn_usage_default;
|
|
9436
9565
|
var init_no_unsafe_token_fn_usage = __esm({
|
|
9437
9566
|
"src/rules/no-unsafe-token-fn-usage.ts"() {
|
|
9438
9567
|
"use strict";
|
|
@@ -9440,9 +9569,9 @@ var init_no_unsafe_token_fn_usage = __esm({
|
|
|
9440
9569
|
init_helpers();
|
|
9441
9570
|
init_utils();
|
|
9442
9571
|
init_nodes();
|
|
9443
|
-
|
|
9444
|
-
|
|
9445
|
-
name:
|
|
9572
|
+
RULE_NAME14 = "no-unsafe-token-fn-usage";
|
|
9573
|
+
rule14 = createRule({
|
|
9574
|
+
name: RULE_NAME14,
|
|
9446
9575
|
meta: {
|
|
9447
9576
|
docs: {
|
|
9448
9577
|
description: "Prevent users from using the token function in situations where they could simply use the raw design token."
|
|
@@ -9567,12 +9696,12 @@ var init_no_unsafe_token_fn_usage = __esm({
|
|
|
9567
9696
|
};
|
|
9568
9697
|
}
|
|
9569
9698
|
});
|
|
9570
|
-
no_unsafe_token_fn_usage_default =
|
|
9699
|
+
no_unsafe_token_fn_usage_default = rule14;
|
|
9571
9700
|
}
|
|
9572
9701
|
});
|
|
9573
9702
|
|
|
9574
9703
|
// src/rules/prefer-longhand-properties.ts
|
|
9575
|
-
var
|
|
9704
|
+
var RULE_NAME15, rule15, prefer_longhand_properties_default;
|
|
9576
9705
|
var init_prefer_longhand_properties = __esm({
|
|
9577
9706
|
"src/rules/prefer-longhand-properties.ts"() {
|
|
9578
9707
|
"use strict";
|
|
@@ -9580,9 +9709,9 @@ var init_prefer_longhand_properties = __esm({
|
|
|
9580
9709
|
init_helpers();
|
|
9581
9710
|
init_utils();
|
|
9582
9711
|
init_nodes();
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
name:
|
|
9712
|
+
RULE_NAME15 = "prefer-longhand-properties";
|
|
9713
|
+
rule15 = createRule({
|
|
9714
|
+
name: RULE_NAME15,
|
|
9586
9715
|
meta: {
|
|
9587
9716
|
docs: {
|
|
9588
9717
|
description: "Discourage the use of shorthand properties and promote the preference for longhand properties in the codebase."
|
|
@@ -9689,12 +9818,12 @@ var init_prefer_longhand_properties = __esm({
|
|
|
9689
9818
|
};
|
|
9690
9819
|
}
|
|
9691
9820
|
});
|
|
9692
|
-
prefer_longhand_properties_default =
|
|
9821
|
+
prefer_longhand_properties_default = rule15;
|
|
9693
9822
|
}
|
|
9694
9823
|
});
|
|
9695
9824
|
|
|
9696
9825
|
// src/rules/prefer-shorthand-properties.ts
|
|
9697
|
-
var
|
|
9826
|
+
var RULE_NAME16, rule16, prefer_shorthand_properties_default;
|
|
9698
9827
|
var init_prefer_shorthand_properties = __esm({
|
|
9699
9828
|
"src/rules/prefer-shorthand-properties.ts"() {
|
|
9700
9829
|
"use strict";
|
|
@@ -9702,9 +9831,9 @@ var init_prefer_shorthand_properties = __esm({
|
|
|
9702
9831
|
init_helpers();
|
|
9703
9832
|
init_utils();
|
|
9704
9833
|
init_nodes();
|
|
9705
|
-
|
|
9706
|
-
|
|
9707
|
-
name:
|
|
9834
|
+
RULE_NAME16 = "prefer-shorthand-properties";
|
|
9835
|
+
rule16 = createRule({
|
|
9836
|
+
name: RULE_NAME16,
|
|
9708
9837
|
meta: {
|
|
9709
9838
|
docs: {
|
|
9710
9839
|
description: "Discourage the use of longhand properties and promote the preference for shorthand properties in the codebase."
|
|
@@ -9823,7 +9952,7 @@ var init_prefer_shorthand_properties = __esm({
|
|
|
9823
9952
|
};
|
|
9824
9953
|
}
|
|
9825
9954
|
});
|
|
9826
|
-
prefer_shorthand_properties_default =
|
|
9955
|
+
prefer_shorthand_properties_default = rule16;
|
|
9827
9956
|
}
|
|
9828
9957
|
});
|
|
9829
9958
|
|
|
@@ -9948,7 +10077,7 @@ var init_composite_properties = __esm({
|
|
|
9948
10077
|
});
|
|
9949
10078
|
|
|
9950
10079
|
// src/rules/prefer-atomic-properties.ts
|
|
9951
|
-
var
|
|
10080
|
+
var RULE_NAME17, rule17, prefer_atomic_properties_default;
|
|
9952
10081
|
var init_prefer_atomic_properties = __esm({
|
|
9953
10082
|
"src/rules/prefer-atomic-properties.ts"() {
|
|
9954
10083
|
"use strict";
|
|
@@ -9957,9 +10086,9 @@ var init_prefer_atomic_properties = __esm({
|
|
|
9957
10086
|
init_helpers();
|
|
9958
10087
|
init_composite_properties();
|
|
9959
10088
|
init_nodes();
|
|
9960
|
-
|
|
9961
|
-
|
|
9962
|
-
name:
|
|
10089
|
+
RULE_NAME17 = "prefer-atomic-properties";
|
|
10090
|
+
rule17 = createRule({
|
|
10091
|
+
name: RULE_NAME17,
|
|
9963
10092
|
meta: {
|
|
9964
10093
|
docs: {
|
|
9965
10094
|
description: "Encourage the use of atomic properties instead of composite properties in the codebase."
|
|
@@ -10076,12 +10205,12 @@ var init_prefer_atomic_properties = __esm({
|
|
|
10076
10205
|
};
|
|
10077
10206
|
}
|
|
10078
10207
|
});
|
|
10079
|
-
prefer_atomic_properties_default =
|
|
10208
|
+
prefer_atomic_properties_default = rule17;
|
|
10080
10209
|
}
|
|
10081
10210
|
});
|
|
10082
10211
|
|
|
10083
10212
|
// src/rules/prefer-composite-properties.ts
|
|
10084
|
-
var
|
|
10213
|
+
var RULE_NAME18, rule18, prefer_composite_properties_default;
|
|
10085
10214
|
var init_prefer_composite_properties = __esm({
|
|
10086
10215
|
"src/rules/prefer-composite-properties.ts"() {
|
|
10087
10216
|
"use strict";
|
|
@@ -10090,9 +10219,9 @@ var init_prefer_composite_properties = __esm({
|
|
|
10090
10219
|
init_utils();
|
|
10091
10220
|
init_composite_properties();
|
|
10092
10221
|
init_nodes();
|
|
10093
|
-
|
|
10094
|
-
|
|
10095
|
-
name:
|
|
10222
|
+
RULE_NAME18 = "prefer-composite-properties";
|
|
10223
|
+
rule18 = createRule({
|
|
10224
|
+
name: RULE_NAME18,
|
|
10096
10225
|
meta: {
|
|
10097
10226
|
docs: {
|
|
10098
10227
|
description: "Encourage the use of composite properties instead of atomic properties in the codebase."
|
|
@@ -10205,12 +10334,12 @@ var init_prefer_composite_properties = __esm({
|
|
|
10205
10334
|
};
|
|
10206
10335
|
}
|
|
10207
10336
|
});
|
|
10208
|
-
prefer_composite_properties_default =
|
|
10337
|
+
prefer_composite_properties_default = rule18;
|
|
10209
10338
|
}
|
|
10210
10339
|
});
|
|
10211
10340
|
|
|
10212
10341
|
// src/rules/prefer-unified-property-style.ts
|
|
10213
|
-
var
|
|
10342
|
+
var RULE_NAME19, rule19, prefer_unified_property_style_default;
|
|
10214
10343
|
var init_prefer_unified_property_style = __esm({
|
|
10215
10344
|
"src/rules/prefer-unified-property-style.ts"() {
|
|
10216
10345
|
"use strict";
|
|
@@ -10219,9 +10348,9 @@ var init_prefer_unified_property_style = __esm({
|
|
|
10219
10348
|
init_utils();
|
|
10220
10349
|
init_composite_properties();
|
|
10221
10350
|
init_nodes();
|
|
10222
|
-
|
|
10223
|
-
|
|
10224
|
-
name:
|
|
10351
|
+
RULE_NAME19 = "prefer-unified-property-style";
|
|
10352
|
+
rule19 = createRule({
|
|
10353
|
+
name: RULE_NAME19,
|
|
10225
10354
|
meta: {
|
|
10226
10355
|
docs: {
|
|
10227
10356
|
description: "Discourage mixing atomic and composite forms of the same property in a style declaration. Atomic styles give more consistent results."
|
|
@@ -10327,7 +10456,7 @@ var init_prefer_unified_property_style = __esm({
|
|
|
10327
10456
|
};
|
|
10328
10457
|
}
|
|
10329
10458
|
});
|
|
10330
|
-
prefer_unified_property_style_default =
|
|
10459
|
+
prefer_unified_property_style_default = rule19;
|
|
10331
10460
|
}
|
|
10332
10461
|
});
|
|
10333
10462
|
|
|
@@ -10340,6 +10469,7 @@ var init_rules = __esm({
|
|
|
10340
10469
|
init_file_not_included();
|
|
10341
10470
|
init_no_config_function_in_source();
|
|
10342
10471
|
init_no_debug();
|
|
10472
|
+
init_no_deprecated_tokens();
|
|
10343
10473
|
init_no_dynamic_styling();
|
|
10344
10474
|
init_no_escape_hatch();
|
|
10345
10475
|
init_no_hardcoded_color();
|
|
@@ -10359,21 +10489,22 @@ var init_rules = __esm({
|
|
|
10359
10489
|
[RULE_NAME]: file_not_included_default,
|
|
10360
10490
|
[RULE_NAME2]: no_config_function_in_source_default,
|
|
10361
10491
|
[RULE_NAME3]: no_debug_default,
|
|
10362
|
-
[RULE_NAME4]:
|
|
10363
|
-
[RULE_NAME5]:
|
|
10364
|
-
[RULE_NAME6]:
|
|
10365
|
-
[RULE_NAME7]:
|
|
10366
|
-
[
|
|
10367
|
-
[
|
|
10368
|
-
[
|
|
10369
|
-
[RULE_NAME11]:
|
|
10370
|
-
[RULE_NAME12]:
|
|
10371
|
-
[RULE_NAME13]:
|
|
10372
|
-
[RULE_NAME14]:
|
|
10373
|
-
[RULE_NAME15]:
|
|
10374
|
-
[RULE_NAME16]:
|
|
10375
|
-
[RULE_NAME17]:
|
|
10376
|
-
[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
|
|
10377
10508
|
};
|
|
10378
10509
|
}
|
|
10379
10510
|
});
|
|
@@ -10388,7 +10519,7 @@ var init_all = __esm({
|
|
|
10388
10519
|
init_file_not_included();
|
|
10389
10520
|
init_no_config_function_in_source();
|
|
10390
10521
|
init_no_invalid_token_paths();
|
|
10391
|
-
errorRules = [RULE_NAME, RULE_NAME2,
|
|
10522
|
+
errorRules = [RULE_NAME, RULE_NAME2, RULE_NAME10];
|
|
10392
10523
|
allRules = Object.fromEntries(
|
|
10393
10524
|
Object.entries(rules).map(([name2]) => {
|
|
10394
10525
|
return [`@pandacss/${name2}`, errorRules.includes(name2) ? "error" : "warn"];
|
|
@@ -10422,7 +10553,8 @@ var init_recommended = __esm({
|
|
|
10422
10553
|
"@pandacss/no-invalid-nesting": "error",
|
|
10423
10554
|
"@pandacss/no-invalid-token-paths": "error",
|
|
10424
10555
|
"@pandacss/no-property-renaming": "warn",
|
|
10425
|
-
"@pandacss/no-unsafe-token-fn-usage": "warn"
|
|
10556
|
+
"@pandacss/no-unsafe-token-fn-usage": "warn",
|
|
10557
|
+
"@pandacss/no-deprecated-tokens": "warn"
|
|
10426
10558
|
}
|
|
10427
10559
|
};
|
|
10428
10560
|
}
|