@pandacss/eslint-plugin 0.2.11 → 0.2.13
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/LICENSE +21 -0
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/utils/worker.js +5 -7
- package/dist/utils/worker.mjs +5 -7
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Chakra UI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.js
CHANGED
|
@@ -7884,7 +7884,7 @@ init_cjs_shims();
|
|
|
7884
7884
|
|
|
7885
7885
|
// package.json
|
|
7886
7886
|
var name = "@pandacss/eslint-plugin";
|
|
7887
|
-
var version = "0.2.
|
|
7887
|
+
var version = "0.2.13";
|
|
7888
7888
|
|
|
7889
7889
|
// src/configs/all.ts
|
|
7890
7890
|
init_cjs_shims();
|
|
@@ -7904,7 +7904,7 @@ var import_node_url = require("url");
|
|
|
7904
7904
|
var createRule = import_utils.ESLintUtils.RuleCreator(
|
|
7905
7905
|
(name2) => `https://github.com/chakra-ui/eslint-plugin-panda/blob/main/docs/rules/${name2}.md`
|
|
7906
7906
|
);
|
|
7907
|
-
var isBase = process.env.NODE_ENV !== "test" || importMetaUrl.
|
|
7907
|
+
var isBase = process.env.NODE_ENV !== "test" || importMetaUrl.includes("/dist/index");
|
|
7908
7908
|
var distDir = (0, import_node_url.fileURLToPath)(new URL(isBase ? "./" : "../../dist", importMetaUrl));
|
|
7909
7909
|
var _syncAction = (0, import_synckit.createSyncFn)((0, import_node_path.join)(distDir, "utils/worker.mjs"));
|
|
7910
7910
|
var syncAction = (...args) => {
|
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.2.
|
|
13
|
+
version = "0.2.13";
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
|
|
@@ -27,7 +27,7 @@ var init_utils = __esm({
|
|
|
27
27
|
createRule = ESLintUtils.RuleCreator(
|
|
28
28
|
(name2) => `https://github.com/chakra-ui/eslint-plugin-panda/blob/main/docs/rules/${name2}.md`
|
|
29
29
|
);
|
|
30
|
-
isBase = process.env.NODE_ENV !== "test" || import.meta.url.
|
|
30
|
+
isBase = process.env.NODE_ENV !== "test" || import.meta.url.includes("/dist/index");
|
|
31
31
|
distDir = fileURLToPath(new URL(isBase ? "./" : "../../dist", import.meta.url));
|
|
32
32
|
_syncAction = createSyncFn(join(distDir, "utils/worker.mjs"));
|
|
33
33
|
syncAction = (...args) => {
|
package/dist/utils/worker.js
CHANGED
|
@@ -3967,22 +3967,20 @@ var createContext = (userConfig) => {
|
|
|
3967
3967
|
var import_ts_path = require("@pandacss/config/ts-path");
|
|
3968
3968
|
var import_config3 = require("@pandacss/config");
|
|
3969
3969
|
var import_path = __toESM(require("path"));
|
|
3970
|
-
var configPath;
|
|
3971
3970
|
var contextCache = {};
|
|
3972
|
-
async function _getContext(
|
|
3973
|
-
if (!
|
|
3974
|
-
const cwd = import_path.default.dirname(
|
|
3975
|
-
const ctx = await (0, import_node2.loadConfigAndCreateContext)({ configPath
|
|
3971
|
+
async function _getContext(configPath) {
|
|
3972
|
+
if (!configPath) throw new Error("Invalid config path");
|
|
3973
|
+
const cwd = import_path.default.dirname(configPath);
|
|
3974
|
+
const ctx = await (0, import_node2.loadConfigAndCreateContext)({ configPath, cwd });
|
|
3976
3975
|
return ctx;
|
|
3977
3976
|
}
|
|
3978
3977
|
async function getContext(opts) {
|
|
3979
3978
|
if (process.env.NODE_ENV === "test") {
|
|
3980
|
-
configPath = opts.configPath;
|
|
3981
3979
|
const ctx = createContext();
|
|
3982
3980
|
ctx.getFiles = () => ["App.tsx"];
|
|
3983
3981
|
return ctx;
|
|
3984
3982
|
} else {
|
|
3985
|
-
configPath =
|
|
3983
|
+
const configPath = (0, import_config3.findConfig)({ cwd: opts.configPath ?? opts.currentFile });
|
|
3986
3984
|
if (!contextCache[configPath]) {
|
|
3987
3985
|
contextCache[configPath] = _getContext(configPath);
|
|
3988
3986
|
}
|
package/dist/utils/worker.mjs
CHANGED
|
@@ -3955,22 +3955,20 @@ init_esm_shims();
|
|
|
3955
3955
|
import { resolveTsPathPattern } from "@pandacss/config/ts-path";
|
|
3956
3956
|
import { findConfig } from "@pandacss/config";
|
|
3957
3957
|
import path from "path";
|
|
3958
|
-
var configPath;
|
|
3959
3958
|
var contextCache = {};
|
|
3960
|
-
async function _getContext(
|
|
3961
|
-
if (!
|
|
3962
|
-
const cwd = path.dirname(
|
|
3963
|
-
const ctx = await loadConfigAndCreateContext({ configPath
|
|
3959
|
+
async function _getContext(configPath) {
|
|
3960
|
+
if (!configPath) throw new Error("Invalid config path");
|
|
3961
|
+
const cwd = path.dirname(configPath);
|
|
3962
|
+
const ctx = await loadConfigAndCreateContext({ configPath, cwd });
|
|
3964
3963
|
return ctx;
|
|
3965
3964
|
}
|
|
3966
3965
|
async function getContext(opts) {
|
|
3967
3966
|
if (process.env.NODE_ENV === "test") {
|
|
3968
|
-
configPath = opts.configPath;
|
|
3969
3967
|
const ctx = createContext();
|
|
3970
3968
|
ctx.getFiles = () => ["App.tsx"];
|
|
3971
3969
|
return ctx;
|
|
3972
3970
|
} else {
|
|
3973
|
-
configPath =
|
|
3971
|
+
const configPath = findConfig({ cwd: opts.configPath ?? opts.currentFile });
|
|
3974
3972
|
if (!contextCache[configPath]) {
|
|
3975
3973
|
contextCache[configPath] = _getContext(configPath);
|
|
3976
3974
|
}
|