@pandacss/eslint-plugin 0.1.15 → 0.2.1

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.
@@ -3848,8 +3848,8 @@ var createContext = (userConfig) => {
3848
3848
  var import_ts_path = require("@pandacss/config/ts-path");
3849
3849
  var import_config3 = require("@pandacss/config");
3850
3850
  var import_path = __toESM(require("path"));
3851
- var promise;
3852
3851
  var configPath;
3852
+ var contextCache = {};
3853
3853
  async function _getContext(configPath2) {
3854
3854
  if (!configPath2)
3855
3855
  throw new Error("Invalid config path");
@@ -3865,8 +3865,10 @@ async function getContext(opts) {
3865
3865
  return ctx;
3866
3866
  } else {
3867
3867
  configPath = configPath || (0, import_config3.findConfig)({ cwd: opts.configPath ?? opts.currentFile });
3868
- promise = promise || _getContext(configPath);
3869
- return await promise;
3868
+ if (!contextCache[configPath]) {
3869
+ contextCache[configPath] = _getContext(configPath);
3870
+ }
3871
+ return await contextCache[configPath];
3870
3872
  }
3871
3873
  }
3872
3874
  async function filterInvalidTokens(ctx, paths) {
@@ -3886,9 +3888,6 @@ var arePathsEqual = (path1, path2) => {
3886
3888
  const normalizedPath2 = import_path.default.resolve(path2);
3887
3889
  return normalizedPath1 === normalizedPath2;
3888
3890
  };
3889
- async function isConfigFile(fileName) {
3890
- return arePathsEqual(configPath, fileName);
3891
- }
3892
3891
  async function isValidFile(ctx, fileName) {
3893
3892
  return ctx.getFiles().some((file) => arePathsEqual(file, fileName));
3894
3893
  }
@@ -3939,8 +3938,6 @@ async function runAsync(action, opts, ...args) {
3939
3938
  return resolveLongHand(ctx, ...args);
3940
3939
  case "resolveShorthands":
3941
3940
  return resolveShorthands(ctx, ...args);
3942
- case "isConfigFile":
3943
- return isConfigFile(opts.currentFile);
3944
3941
  case "isValidFile":
3945
3942
  return isValidFile(ctx, opts.currentFile);
3946
3943
  case "isColorAttribute":
@@ -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();
@@ -3832,8 +3832,8 @@ init_esm_shims();
3832
3832
  import { resolveTsPathPattern } from "@pandacss/config/ts-path";
3833
3833
  import { findConfig } from "@pandacss/config";
3834
3834
  import path from "path";
3835
- var promise;
3836
3835
  var configPath;
3836
+ var contextCache = {};
3837
3837
  async function _getContext(configPath2) {
3838
3838
  if (!configPath2)
3839
3839
  throw new Error("Invalid config path");
@@ -3849,8 +3849,10 @@ async function getContext(opts) {
3849
3849
  return ctx;
3850
3850
  } else {
3851
3851
  configPath = configPath || findConfig({ cwd: opts.configPath ?? opts.currentFile });
3852
- promise = promise || _getContext(configPath);
3853
- return await promise;
3852
+ if (!contextCache[configPath]) {
3853
+ contextCache[configPath] = _getContext(configPath);
3854
+ }
3855
+ return await contextCache[configPath];
3854
3856
  }
3855
3857
  }
3856
3858
  async function filterInvalidTokens(ctx, paths) {
@@ -3870,9 +3872,6 @@ var arePathsEqual = (path1, path2) => {
3870
3872
  const normalizedPath2 = path.resolve(path2);
3871
3873
  return normalizedPath1 === normalizedPath2;
3872
3874
  };
3873
- async function isConfigFile(fileName) {
3874
- return arePathsEqual(configPath, fileName);
3875
- }
3876
3875
  async function isValidFile(ctx, fileName) {
3877
3876
  return ctx.getFiles().some((file) => arePathsEqual(file, fileName));
3878
3877
  }
@@ -3923,8 +3922,6 @@ async function runAsync(action, opts, ...args) {
3923
3922
  return resolveLongHand(ctx, ...args);
3924
3923
  case "resolveShorthands":
3925
3924
  return resolveShorthands(ctx, ...args);
3926
- case "isConfigFile":
3927
- return isConfigFile(opts.currentFile);
3928
3925
  case "isValidFile":
3929
3926
  return isValidFile(ctx, opts.currentFile);
3930
3927
  case "isColorAttribute":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/eslint-plugin",
3
- "version": "0.1.15",
3
+ "version": "0.2.1",
4
4
  "description": "Eslint plugin for Panda CSS",
5
5
  "author": "Abraham Aremu <anubra266@gmail.com>",
6
6
  "main": "dist/index.js",