@pandacss/eslint-plugin 0.1.0 → 0.1.2

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.
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  mod
28
28
  ));
29
29
 
30
- // ../node_modules/.pnpm/tsup@8.0.1_postcss@8.4.34_typescript@5.3.3/node_modules/tsup/assets/esm_shims.js
30
+ // ../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/esm_shims.js
31
31
  var init_esm_shims = __esm({
32
- "../node_modules/.pnpm/tsup@8.0.1_postcss@8.4.34_typescript@5.3.3/node_modules/tsup/assets/esm_shims.js"() {
32
+ "../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/esm_shims.js"() {
33
33
  "use strict";
34
34
  }
35
35
  });
package/dist/index.js CHANGED
@@ -28,10 +28,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  mod
29
29
  ));
30
30
 
31
- // ../node_modules/.pnpm/tsup@8.0.1_postcss@8.4.34_typescript@5.3.3/node_modules/tsup/assets/cjs_shims.js
31
+ // ../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/cjs_shims.js
32
32
  var getImportMetaUrl, importMetaUrl;
33
33
  var init_cjs_shims = __esm({
34
- "../node_modules/.pnpm/tsup@8.0.1_postcss@8.4.34_typescript@5.3.3/node_modules/tsup/assets/cjs_shims.js"() {
34
+ "../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/cjs_shims.js"() {
35
35
  "use strict";
36
36
  getImportMetaUrl = () => typeof document === "undefined" ? new URL("file:" + __filename).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
37
37
  importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
@@ -7957,7 +7957,7 @@ init_cjs_shims();
7957
7957
 
7958
7958
  // package.json
7959
7959
  var name = "@pandacss/eslint-plugin";
7960
- var version = "0.1.0";
7960
+ var version = "0.1.2";
7961
7961
 
7962
7962
  // src/configs/all.ts
7963
7963
  init_cjs_shims();
@@ -8074,6 +8074,8 @@ var isValidStyledProp = (node, context) => {
8074
8074
  };
8075
8075
  var isPandaIsh = (name2, context) => {
8076
8076
  const imports = getImports(context);
8077
+ if (imports.length === 0)
8078
+ return false;
8077
8079
  return syncAction("matchFile", getSyncOpts(context), name2, imports);
8078
8080
  };
8079
8081
  var findDeclaration = (name2, context) => {
@@ -8112,14 +8114,13 @@ var isPandaProp = (node, context) => {
8112
8114
  const jsxAncestor = getAncestor(isJSXOpeningElement, node);
8113
8115
  if (!jsxAncestor)
8114
8116
  return;
8115
- if (isJSXMemberExpression(jsxAncestor.name) && isJSXIdentifier(jsxAncestor.name.object) && isPandaIsh(jsxAncestor.name.object.name, context))
8116
- return true;
8117
- else if (!isJSXIdentifier(jsxAncestor.name))
8118
- return;
8119
- if (!isPandaIsh(jsxAncestor.name.name, context) && !isLocalStyledFactory(jsxAncestor, context))
8117
+ if (!isJSXMemberExpression(jsxAncestor.name) && !isJSXIdentifier(jsxAncestor.name))
8120
8118
  return;
8119
+ const name2 = isJSXMemberExpression(jsxAncestor.name) ? jsxAncestor.name.object.name : jsxAncestor.name.name;
8121
8120
  const prop = node.name.name;
8122
- if (typeof prop !== "string" || !isValidProperty(prop, context, jsxAncestor.name.name))
8121
+ if (!isPandaIsh(name2, context) && !isLocalStyledFactory(jsxAncestor, context))
8122
+ return;
8123
+ if (typeof prop !== "string" || !isValidProperty(prop, context, name2))
8123
8124
  return;
8124
8125
  return true;
8125
8126
  };
@@ -9166,6 +9167,8 @@ var rule13 = createRule({
9166
9167
  handleRuntimeFm(node.value.expression);
9167
9168
  },
9168
9169
  Property(node) {
9170
+ if (isLiteral(node.key) && node.key.value?.toString().startsWith("--"))
9171
+ return;
9169
9172
  if (!isCallExpression(node.value) && !isLiteral(node.value) && !isTemplateLiteral(node.value))
9170
9173
  return;
9171
9174
  if (!isPandaAttribute(node, context))
package/dist/index.mjs CHANGED
@@ -3,14 +3,14 @@ import {
3
3
  __esm,
4
4
  __toESM,
5
5
  init_esm_shims
6
- } from "./chunk-HALLAYDZ.mjs";
6
+ } from "./chunk-65XWD4AU.mjs";
7
7
 
8
8
  // package.json
9
9
  var name, version;
10
10
  var init_package = __esm({
11
11
  "package.json"() {
12
12
  name = "@pandacss/eslint-plugin";
13
- version = "0.1.0";
13
+ version = "0.1.2";
14
14
  }
15
15
  });
16
16
 
@@ -8050,6 +8050,8 @@ var init_helpers = __esm({
8050
8050
  };
8051
8051
  isPandaIsh = (name2, context) => {
8052
8052
  const imports = getImports(context);
8053
+ if (imports.length === 0)
8054
+ return false;
8053
8055
  return syncAction("matchFile", getSyncOpts(context), name2, imports);
8054
8056
  };
8055
8057
  findDeclaration = (name2, context) => {
@@ -8088,14 +8090,13 @@ var init_helpers = __esm({
8088
8090
  const jsxAncestor = getAncestor(isJSXOpeningElement, node);
8089
8091
  if (!jsxAncestor)
8090
8092
  return;
8091
- if (isJSXMemberExpression(jsxAncestor.name) && isJSXIdentifier(jsxAncestor.name.object) && isPandaIsh(jsxAncestor.name.object.name, context))
8092
- return true;
8093
- else if (!isJSXIdentifier(jsxAncestor.name))
8094
- return;
8095
- if (!isPandaIsh(jsxAncestor.name.name, context) && !isLocalStyledFactory(jsxAncestor, context))
8093
+ if (!isJSXMemberExpression(jsxAncestor.name) && !isJSXIdentifier(jsxAncestor.name))
8096
8094
  return;
8095
+ const name2 = isJSXMemberExpression(jsxAncestor.name) ? jsxAncestor.name.object.name : jsxAncestor.name.name;
8097
8096
  const prop = node.name.name;
8098
- if (typeof prop !== "string" || !isValidProperty(prop, context, jsxAncestor.name.name))
8097
+ if (!isPandaIsh(name2, context) && !isLocalStyledFactory(jsxAncestor, context))
8098
+ return;
8099
+ if (typeof prop !== "string" || !isValidProperty(prop, context, name2))
8099
8100
  return;
8100
8101
  return true;
8101
8102
  };
@@ -9264,6 +9265,8 @@ var init_no_unsafe_token_fn_usage = __esm({
9264
9265
  handleRuntimeFm(node.value.expression);
9265
9266
  },
9266
9267
  Property(node) {
9268
+ if (isLiteral(node.key) && node.key.value?.toString().startsWith("--"))
9269
+ return;
9267
9270
  if (!isCallExpression(node.value) && !isLiteral(node.value) && !isTemplateLiteral(node.value))
9268
9271
  return;
9269
9272
  if (!isPandaAttribute(node, context))
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  init_esm_shims
3
- } from "../chunk-HALLAYDZ.mjs";
3
+ } from "../chunk-65XWD4AU.mjs";
4
4
 
5
5
  // src/utils/worker.ts
6
6
  init_esm_shims();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/eslint-plugin",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Eslint plugin for Panda CSS",
5
5
  "author": "Abraham Aremu <anubra266@gmail.com>",
6
6
  "main": "dist/index.js",