@pandacss/eslint-plugin 0.3.1 → 0.3.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.
- package/dist/chunk-KBOB3H6E.mjs +20 -0
- package/dist/index.js +94 -7936
- package/dist/index.mjs +109 -7871
- package/dist/utils/worker.js +16 -14
- package/dist/utils/worker.mjs +14 -12
- package/package.json +6 -5
- package/dist/chunk-Q5KKF6BL.mjs +0 -42
package/dist/utils/worker.js
CHANGED
|
@@ -3812,12 +3812,12 @@ var fixturePreset = {
|
|
|
3812
3812
|
// ../fixture/src/create-context.ts
|
|
3813
3813
|
var import_config = require("@pandacss/config");
|
|
3814
3814
|
var import_generator = require("@pandacss/generator");
|
|
3815
|
-
var
|
|
3816
|
-
var import_shared = require("@pandacss/shared");
|
|
3815
|
+
var import_shared2 = require("@pandacss/shared");
|
|
3817
3816
|
|
|
3818
|
-
// ../node_modules/.pnpm/@pandacss+dev@
|
|
3817
|
+
// ../node_modules/.pnpm/@pandacss+dev@1.8.2_typescript@5.7.3/node_modules/@pandacss/dev/dist/index.mjs
|
|
3818
|
+
var import_shared = require("@pandacss/shared");
|
|
3819
3819
|
function defineConfig(config2) {
|
|
3820
|
-
return config2;
|
|
3820
|
+
return Object.assign(config2, { name: "__panda.config__" });
|
|
3821
3821
|
}
|
|
3822
3822
|
|
|
3823
3823
|
// ../sandbox/v9/panda.config.ts
|
|
@@ -3948,8 +3948,8 @@ var fixtureDefaults = {
|
|
|
3948
3948
|
config,
|
|
3949
3949
|
path: "",
|
|
3950
3950
|
hooks: {},
|
|
3951
|
-
serialized: (0,
|
|
3952
|
-
deserialize: () => (0,
|
|
3951
|
+
serialized: (0, import_shared2.stringifyJson)(config),
|
|
3952
|
+
deserialize: () => (0, import_shared2.parseJson)((0, import_shared2.stringifyJson)(config))
|
|
3953
3953
|
};
|
|
3954
3954
|
var createGeneratorContext = (userConfig) => {
|
|
3955
3955
|
const resolvedConfig = userConfig ? (0, import_config.mergeConfigs)([fixtureDefaults.config, userConfig]) : fixtureDefaults.config;
|
|
@@ -3981,7 +3981,6 @@ async function getContext(opts) {
|
|
|
3981
3981
|
return ctx;
|
|
3982
3982
|
} else {
|
|
3983
3983
|
const configPath = (0, import_config3.findConfig)({ cwd: opts.configPath ?? opts.currentFile });
|
|
3984
|
-
const cwd = import_path.default.dirname(configPath);
|
|
3985
3984
|
if (!contextCache[configPath]) {
|
|
3986
3985
|
contextCache[configPath] = _getContext(configPath);
|
|
3987
3986
|
}
|
|
@@ -4023,16 +4022,19 @@ async function isValidFile(ctx, fileName) {
|
|
|
4023
4022
|
async function resolveShorthands(ctx, name) {
|
|
4024
4023
|
return ctx.utility.getPropShorthandsMap().get(name);
|
|
4025
4024
|
}
|
|
4025
|
+
var reverseLonghandCache = /* @__PURE__ */ new WeakMap();
|
|
4026
4026
|
async function resolveLongHand(ctx, name) {
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
for (const
|
|
4031
|
-
|
|
4027
|
+
let reverseMap = reverseLonghandCache.get(ctx);
|
|
4028
|
+
if (!reverseMap) {
|
|
4029
|
+
reverseMap = /* @__PURE__ */ new Map();
|
|
4030
|
+
for (const [key, values] of ctx.utility.getPropShorthandsMap()) {
|
|
4031
|
+
for (const value of values) {
|
|
4032
|
+
reverseMap.set(value, key);
|
|
4033
|
+
}
|
|
4032
4034
|
}
|
|
4035
|
+
reverseLonghandCache.set(ctx, reverseMap);
|
|
4033
4036
|
}
|
|
4034
|
-
|
|
4035
|
-
return result;
|
|
4037
|
+
return reverseMap.get(name);
|
|
4036
4038
|
}
|
|
4037
4039
|
async function isValidProperty(ctx, name, patternName) {
|
|
4038
4040
|
const isValid = ctx.isValidProperty(name);
|
package/dist/utils/worker.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_esm_shims
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-KBOB3H6E.mjs";
|
|
4
4
|
|
|
5
5
|
// src/utils/worker.ts
|
|
6
6
|
init_esm_shims();
|
|
@@ -3793,16 +3793,16 @@ var fixturePreset = {
|
|
|
3793
3793
|
init_esm_shims();
|
|
3794
3794
|
import { mergeConfigs } from "@pandacss/config";
|
|
3795
3795
|
import { Generator } from "@pandacss/generator";
|
|
3796
|
-
import { PandaContext } from "@pandacss/node";
|
|
3797
3796
|
import { stringifyJson, parseJson } from "@pandacss/shared";
|
|
3798
3797
|
|
|
3799
3798
|
// ../sandbox/v9/panda.config.ts
|
|
3800
3799
|
init_esm_shims();
|
|
3801
3800
|
|
|
3802
|
-
// ../node_modules/.pnpm/@pandacss+dev@
|
|
3801
|
+
// ../node_modules/.pnpm/@pandacss+dev@1.8.2_typescript@5.7.3/node_modules/@pandacss/dev/dist/index.mjs
|
|
3803
3802
|
init_esm_shims();
|
|
3803
|
+
import { PandaError } from "@pandacss/shared";
|
|
3804
3804
|
function defineConfig(config2) {
|
|
3805
|
-
return config2;
|
|
3805
|
+
return Object.assign(config2, { name: "__panda.config__" });
|
|
3806
3806
|
}
|
|
3807
3807
|
|
|
3808
3808
|
// ../sandbox/v9/panda.config.ts
|
|
@@ -3969,7 +3969,6 @@ async function getContext(opts) {
|
|
|
3969
3969
|
return ctx;
|
|
3970
3970
|
} else {
|
|
3971
3971
|
const configPath = findConfig({ cwd: opts.configPath ?? opts.currentFile });
|
|
3972
|
-
const cwd = path.dirname(configPath);
|
|
3973
3972
|
if (!contextCache[configPath]) {
|
|
3974
3973
|
contextCache[configPath] = _getContext(configPath);
|
|
3975
3974
|
}
|
|
@@ -4011,16 +4010,19 @@ async function isValidFile(ctx, fileName) {
|
|
|
4011
4010
|
async function resolveShorthands(ctx, name) {
|
|
4012
4011
|
return ctx.utility.getPropShorthandsMap().get(name);
|
|
4013
4012
|
}
|
|
4013
|
+
var reverseLonghandCache = /* @__PURE__ */ new WeakMap();
|
|
4014
4014
|
async function resolveLongHand(ctx, name) {
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
for (const
|
|
4019
|
-
|
|
4015
|
+
let reverseMap = reverseLonghandCache.get(ctx);
|
|
4016
|
+
if (!reverseMap) {
|
|
4017
|
+
reverseMap = /* @__PURE__ */ new Map();
|
|
4018
|
+
for (const [key, values] of ctx.utility.getPropShorthandsMap()) {
|
|
4019
|
+
for (const value of values) {
|
|
4020
|
+
reverseMap.set(value, key);
|
|
4021
|
+
}
|
|
4020
4022
|
}
|
|
4023
|
+
reverseLonghandCache.set(ctx, reverseMap);
|
|
4021
4024
|
}
|
|
4022
|
-
|
|
4023
|
-
return result;
|
|
4025
|
+
return reverseMap.get(name);
|
|
4024
4026
|
}
|
|
4025
4027
|
async function isValidProperty(ctx, name, patternName) {
|
|
4026
4028
|
const isValid = ctx.isValidProperty(name);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/eslint-plugin",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Eslint plugin for Panda CSS",
|
|
5
5
|
"author": "Abraham Aremu <anubra266@gmail.com>",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -26,10 +26,11 @@
|
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@pandacss/config": "^
|
|
30
|
-
"@pandacss/generator": "^
|
|
31
|
-
"@pandacss/node": "^
|
|
32
|
-
"@pandacss/shared": "^
|
|
29
|
+
"@pandacss/config": "^1.8.2",
|
|
30
|
+
"@pandacss/generator": "^1.8.2",
|
|
31
|
+
"@pandacss/node": "^1.8.2",
|
|
32
|
+
"@pandacss/shared": "^1.8.2",
|
|
33
|
+
"@typescript-eslint/scope-manager": "^8.24.0",
|
|
33
34
|
"@typescript-eslint/utils": "^8.21.0",
|
|
34
35
|
"hookable": "^5.5.3",
|
|
35
36
|
"micromatch": "^4.0.8",
|
package/dist/chunk-Q5KKF6BL.mjs
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __esm = (fn, res) => function __init() {
|
|
8
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
9
|
-
};
|
|
10
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
11
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from))
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
|
-
|
|
30
|
-
// ../node_modules/.pnpm/tsup@8.3.6_postcss@8.4.49_typescript@5.7.3/node_modules/tsup/assets/esm_shims.js
|
|
31
|
-
var init_esm_shims = __esm({
|
|
32
|
-
"../node_modules/.pnpm/tsup@8.3.6_postcss@8.4.49_typescript@5.7.3/node_modules/tsup/assets/esm_shims.js"() {
|
|
33
|
-
"use strict";
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
export {
|
|
38
|
-
__esm,
|
|
39
|
-
__commonJS,
|
|
40
|
-
__toESM,
|
|
41
|
-
init_esm_shims
|
|
42
|
-
};
|