@pandacss/eslint-plugin 0.1.8 → 0.1.9

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 CHANGED
@@ -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.8";
7960
+ var version = "0.1.9";
7961
7961
 
7962
7962
  // src/configs/all.ts
7963
7963
  init_cjs_shims();
@@ -8078,12 +8078,16 @@ var isPandaIsh = (name2, context) => {
8078
8078
  return syncAction("matchFile", getSyncOpts(context), name2, imports);
8079
8079
  };
8080
8080
  var findDeclaration = (name2, context) => {
8081
- const scope = (0, import_scope_manager.analyze)(context.sourceCode.ast, {
8082
- sourceType: "module"
8083
- });
8084
- const decl = scope.variables.find((v) => v.name === name2)?.defs.find((d) => isIdentifier(d.name) && d.name.name === name2)?.node;
8085
- if (isVariableDeclarator(decl))
8086
- return decl;
8081
+ try {
8082
+ const scope = (0, import_scope_manager.analyze)(context.sourceCode.ast, {
8083
+ sourceType: "module"
8084
+ });
8085
+ const decl = scope.variables.find((v) => v.name === name2)?.defs.find((d) => isIdentifier(d.name) && d.name.name === name2)?.node;
8086
+ if (isVariableDeclarator(decl))
8087
+ return decl;
8088
+ } catch (error) {
8089
+ return;
8090
+ }
8087
8091
  };
8088
8092
  var isLocalStyledFactory = (node, context) => {
8089
8093
  if (!isJSXIdentifier(node.name))
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.1.8";
13
+ version = "0.1.9";
14
14
  }
15
15
  });
16
16
 
@@ -8054,12 +8054,16 @@ var init_helpers = __esm({
8054
8054
  return syncAction("matchFile", getSyncOpts(context), name2, imports);
8055
8055
  };
8056
8056
  findDeclaration = (name2, context) => {
8057
- const scope = (0, import_scope_manager.analyze)(context.sourceCode.ast, {
8058
- sourceType: "module"
8059
- });
8060
- const decl = scope.variables.find((v) => v.name === name2)?.defs.find((d) => isIdentifier(d.name) && d.name.name === name2)?.node;
8061
- if (isVariableDeclarator(decl))
8062
- return decl;
8057
+ try {
8058
+ const scope = (0, import_scope_manager.analyze)(context.sourceCode.ast, {
8059
+ sourceType: "module"
8060
+ });
8061
+ const decl = scope.variables.find((v) => v.name === name2)?.defs.find((d) => isIdentifier(d.name) && d.name.name === name2)?.node;
8062
+ if (isVariableDeclarator(decl))
8063
+ return decl;
8064
+ } catch (error) {
8065
+ return;
8066
+ }
8063
8067
  };
8064
8068
  isLocalStyledFactory = (node, context) => {
8065
8069
  if (!isJSXIdentifier(node.name))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/eslint-plugin",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Eslint plugin for Panda CSS",
5
5
  "author": "Abraham Aremu <anubra266@gmail.com>",
6
6
  "main": "dist/index.js",