@pandacss/eslint-plugin 0.2.0 → 0.2.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.2_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/esm_shims.js
30
+ // ../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.38_typescript@5.6.3/node_modules/tsup/assets/esm_shims.js
31
31
  var init_esm_shims = __esm({
32
- "../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/esm_shims.js"() {
32
+ "../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.38_typescript@5.6.3/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.2_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/cjs_shims.js
31
+ // ../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.38_typescript@5.6.3/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.2_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/cjs_shims.js"() {
34
+ "../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.38_typescript@5.6.3/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.2.0";
7960
+ var version = "0.2.2";
7961
7961
 
7962
7962
  // src/configs/all.ts
7963
7963
  init_cjs_shims();
@@ -8085,7 +8085,12 @@ var isPandaIsh = (name2, context) => {
8085
8085
  };
8086
8086
  var findDeclaration = (name2, context) => {
8087
8087
  try {
8088
- const scope = (0, import_scope_manager.analyze)(context.sourceCode.ast, {
8088
+ const src = context.sourceCode;
8089
+ if (!src) {
8090
+ console.warn("\u26A0\uFE0F ESLint's sourceCode is not available. Ensure that the rule is invoked with valid code.");
8091
+ return void 0;
8092
+ }
8093
+ const scope = (0, import_scope_manager.analyze)(src.ast, {
8089
8094
  sourceType: "module"
8090
8095
  });
8091
8096
  const decl = scope.variables.find((v) => v.name === name2)?.defs.find((d) => isIdentifier(d.name) && d.name.name === name2)?.node;
@@ -8201,7 +8206,7 @@ var isColorToken = (value, context) => {
8201
8206
  };
8202
8207
  var invalidTokensCache = /* @__PURE__ */ new Map();
8203
8208
  var extractTokens = (value) => {
8204
- const regex = /token\(([^"'(),]+)(?:,\s*([^"'(),]+))?\)|\{([^{}]+)\}/g;
8209
+ const regex = /token\(([^"'(),]+)(?:,\s*([^"'(),]+))?\)|\{([^{\r\n}]+)\}/g;
8205
8210
  const matches = [];
8206
8211
  let match;
8207
8212
  while ((match = regex.exec(value)) !== null) {
package/dist/index.mjs CHANGED
@@ -3,14 +3,14 @@ import {
3
3
  __esm,
4
4
  __toESM,
5
5
  init_esm_shims
6
- } from "./chunk-65XWD4AU.mjs";
6
+ } from "./chunk-YLUMOAQM.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.2.0";
13
+ version = "0.2.2";
14
14
  }
15
15
  });
16
16
 
@@ -8086,7 +8086,12 @@ var init_helpers = __esm({
8086
8086
  };
8087
8087
  findDeclaration = (name2, context) => {
8088
8088
  try {
8089
- const scope = (0, import_scope_manager.analyze)(context.sourceCode.ast, {
8089
+ const src = context.sourceCode;
8090
+ if (!src) {
8091
+ console.warn("\u26A0\uFE0F ESLint's sourceCode is not available. Ensure that the rule is invoked with valid code.");
8092
+ return void 0;
8093
+ }
8094
+ const scope = (0, import_scope_manager.analyze)(src.ast, {
8090
8095
  sourceType: "module"
8091
8096
  });
8092
8097
  const decl = scope.variables.find((v) => v.name === name2)?.defs.find((d) => isIdentifier(d.name) && d.name.name === name2)?.node;
@@ -8202,7 +8207,7 @@ var init_helpers = __esm({
8202
8207
  };
8203
8208
  invalidTokensCache = /* @__PURE__ */ new Map();
8204
8209
  extractTokens = (value) => {
8205
- const regex = /token\(([^"'(),]+)(?:,\s*([^"'(),]+))?\)|\{([^{}]+)\}/g;
8210
+ const regex = /token\(([^"'(),]+)(?:,\s*([^"'(),]+))?\)|\{([^{\r\n}]+)\}/g;
8206
8211
  const matches = [];
8207
8212
  let match;
8208
8213
  while ((match = regex.exec(value)) !== null) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  init_esm_shims
3
- } from "../chunk-65XWD4AU.mjs";
3
+ } from "../chunk-YLUMOAQM.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.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Eslint plugin for Panda CSS",
5
5
  "author": "Abraham Aremu <anubra266@gmail.com>",
6
6
  "main": "dist/index.js",