Skip to content

Commit b004285

Browse files
authored
chore: ignore non panda files in no-dynamic-styling (#148)
1 parent b74af36 commit b004285

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

.changeset/spotty-lemons-float.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@pandacss/eslint-plugin': patch
3+
---
4+
5+
Ignore non panda files

.changeset/tender-chefs-help.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@pandacss/eslint-plugin': patch
3+
---
4+
5+
Fix array syntax in `no-dynamic-styling`

plugin/src/rules/no-dynamic-styling.ts

+7
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ const rule: Rule = createRule({
5050
}
5151

5252
if (!isPandaProp(node, context)) return
53+
if (isArrayExpression(node.value.expression)) {
54+
return checkElements(node.value.expression, context)
55+
}
5356

5457
context.report({
5558
node: node.value,
@@ -82,6 +85,10 @@ const rule: Rule = createRule({
8285

8386
if (!isPandaAttribute(node, context)) return
8487

88+
if (isArrayExpression(node.value)) {
89+
return checkElements(node.value, context)
90+
}
91+
8592
context.report({
8693
node: node.value,
8794
messageId: 'dynamic',

0 commit comments

Comments
 (0)