@pandacss/eslint-plugin 0.1.5 → 0.1.6
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 +14 -3
- package/dist/index.mjs +15 -4
- package/dist/utils/worker.js +2 -2
- package/dist/utils/worker.mjs +2 -2
- package/package.json +5 -5
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.
|
|
7960
|
+
var version = "0.1.6";
|
|
7961
7961
|
|
|
7962
7962
|
// src/configs/all.ts
|
|
7963
7963
|
init_cjs_shims();
|
|
@@ -8057,7 +8057,11 @@ var _getImports = (context) => {
|
|
|
8057
8057
|
};
|
|
8058
8058
|
var getImports = (context) => {
|
|
8059
8059
|
const imports = _getImports(context);
|
|
8060
|
-
|
|
8060
|
+
try {
|
|
8061
|
+
return imports.filter((imp) => syncAction("matchImports", getSyncOpts(context), imp));
|
|
8062
|
+
} catch (error) {
|
|
8063
|
+
return [];
|
|
8064
|
+
}
|
|
8061
8065
|
};
|
|
8062
8066
|
var isValidStyledProp = (node, context) => {
|
|
8063
8067
|
if (typeof node === "string")
|
|
@@ -8116,7 +8120,7 @@ var isPandaProp = (node, context) => {
|
|
|
8116
8120
|
return;
|
|
8117
8121
|
return true;
|
|
8118
8122
|
};
|
|
8119
|
-
var
|
|
8123
|
+
var isStyledNode = (node, context, calleeName) => {
|
|
8120
8124
|
if (!isIdentifier(node.key) && !isLiteral(node.key) && !isTemplateLiteral(node.key))
|
|
8121
8125
|
return;
|
|
8122
8126
|
if (isIdentifier(node.key) && !isValidProperty(node.key.name, context, calleeName))
|
|
@@ -8127,6 +8131,13 @@ var isStyledProperty = (node, context, calleeName) => {
|
|
|
8127
8131
|
return;
|
|
8128
8132
|
return true;
|
|
8129
8133
|
};
|
|
8134
|
+
var isStyledProperty = (node, context, calleeName) => {
|
|
8135
|
+
const ancestor = node.parent.parent;
|
|
8136
|
+
const isValidFuncAncestor = isCallExpression(ancestor) && isIdentifier(ancestor.callee) && isPandaIsh(ancestor.callee.name, context);
|
|
8137
|
+
if (isValidFuncAncestor)
|
|
8138
|
+
return isStyledNode(node, context, calleeName);
|
|
8139
|
+
return isStyledNode(ancestor, context, calleeName) && isStyledNode(node, context, calleeName);
|
|
8140
|
+
};
|
|
8130
8141
|
var isInPandaFunction = (node, context) => {
|
|
8131
8142
|
const callAncestor = getAncestor(isCallExpression, node);
|
|
8132
8143
|
if (!callAncestor)
|
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.
|
|
13
|
+
version = "0.1.6";
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
|
|
@@ -7975,7 +7975,7 @@ var init_nodes = __esm({
|
|
|
7975
7975
|
});
|
|
7976
7976
|
|
|
7977
7977
|
// src/utils/helpers.ts
|
|
7978
|
-
var import_scope_manager, getAncestor, getSyncOpts, getImportSpecifiers, hasPkgImport, isPandaConfigFunction, _getImports, getImports, isValidStyledProp, isPandaIsh, findDeclaration, isLocalStyledFactory, isValidFile, isValidProperty, isPandaImport, isPandaProp, isStyledProperty, isInPandaFunction, isInJSXProp, isPandaAttribute, resolveLonghand, resolveShorthands, isColorAttribute, isColorToken, extractTokens, getInvalidTokens, getTokenImport, getTaggedTemplateCaller;
|
|
7978
|
+
var import_scope_manager, getAncestor, getSyncOpts, getImportSpecifiers, hasPkgImport, isPandaConfigFunction, _getImports, getImports, isValidStyledProp, isPandaIsh, findDeclaration, isLocalStyledFactory, isValidFile, isValidProperty, isPandaImport, isPandaProp, isStyledNode, isStyledProperty, isInPandaFunction, isInJSXProp, isPandaAttribute, resolveLonghand, resolveShorthands, isColorAttribute, isColorToken, extractTokens, getInvalidTokens, getTokenImport, getTaggedTemplateCaller;
|
|
7979
7979
|
var init_helpers = __esm({
|
|
7980
7980
|
"src/utils/helpers.ts"() {
|
|
7981
7981
|
"use strict";
|
|
@@ -8033,7 +8033,11 @@ var init_helpers = __esm({
|
|
|
8033
8033
|
};
|
|
8034
8034
|
getImports = (context) => {
|
|
8035
8035
|
const imports = _getImports(context);
|
|
8036
|
-
|
|
8036
|
+
try {
|
|
8037
|
+
return imports.filter((imp) => syncAction("matchImports", getSyncOpts(context), imp));
|
|
8038
|
+
} catch (error) {
|
|
8039
|
+
return [];
|
|
8040
|
+
}
|
|
8037
8041
|
};
|
|
8038
8042
|
isValidStyledProp = (node, context) => {
|
|
8039
8043
|
if (typeof node === "string")
|
|
@@ -8092,7 +8096,7 @@ var init_helpers = __esm({
|
|
|
8092
8096
|
return;
|
|
8093
8097
|
return true;
|
|
8094
8098
|
};
|
|
8095
|
-
|
|
8099
|
+
isStyledNode = (node, context, calleeName) => {
|
|
8096
8100
|
if (!isIdentifier(node.key) && !isLiteral(node.key) && !isTemplateLiteral(node.key))
|
|
8097
8101
|
return;
|
|
8098
8102
|
if (isIdentifier(node.key) && !isValidProperty(node.key.name, context, calleeName))
|
|
@@ -8103,6 +8107,13 @@ var init_helpers = __esm({
|
|
|
8103
8107
|
return;
|
|
8104
8108
|
return true;
|
|
8105
8109
|
};
|
|
8110
|
+
isStyledProperty = (node, context, calleeName) => {
|
|
8111
|
+
const ancestor = node.parent.parent;
|
|
8112
|
+
const isValidFuncAncestor = isCallExpression(ancestor) && isIdentifier(ancestor.callee) && isPandaIsh(ancestor.callee.name, context);
|
|
8113
|
+
if (isValidFuncAncestor)
|
|
8114
|
+
return isStyledNode(node, context, calleeName);
|
|
8115
|
+
return isStyledNode(ancestor, context, calleeName) && isStyledNode(node, context, calleeName);
|
|
8116
|
+
};
|
|
8106
8117
|
isInPandaFunction = (node, context) => {
|
|
8107
8118
|
const callAncestor = getAncestor(isCallExpression, node);
|
|
8108
8119
|
if (!callAncestor)
|
package/dist/utils/worker.js
CHANGED
|
@@ -38,7 +38,7 @@ module.exports = __toCommonJS(worker_exports);
|
|
|
38
38
|
var import_node2 = require("@pandacss/node");
|
|
39
39
|
var import_synckit = require("synckit");
|
|
40
40
|
|
|
41
|
-
// ../node_modules/.pnpm/@pandacss+preset-base@0.
|
|
41
|
+
// ../node_modules/.pnpm/@pandacss+preset-base@0.40.1/node_modules/@pandacss/preset-base/dist/index.mjs
|
|
42
42
|
var conditions = {
|
|
43
43
|
hover: "&:is(:hover, [data-hover])",
|
|
44
44
|
focus: "&:is(:focus, [data-focus])",
|
|
@@ -2908,7 +2908,7 @@ var preset = definePreset({
|
|
|
2908
2908
|
});
|
|
2909
2909
|
var src_default = preset;
|
|
2910
2910
|
|
|
2911
|
-
// ../node_modules/.pnpm/@pandacss+preset-panda@0.
|
|
2911
|
+
// ../node_modules/.pnpm/@pandacss+preset-panda@0.40.1/node_modules/@pandacss/preset-panda/dist/index.mjs
|
|
2912
2912
|
var breakpoints = {
|
|
2913
2913
|
sm: "640px",
|
|
2914
2914
|
md: "768px",
|
package/dist/utils/worker.mjs
CHANGED
|
@@ -13,7 +13,7 @@ init_esm_shims();
|
|
|
13
13
|
// ../fixture/src/config.ts
|
|
14
14
|
init_esm_shims();
|
|
15
15
|
|
|
16
|
-
// ../node_modules/.pnpm/@pandacss+preset-base@0.
|
|
16
|
+
// ../node_modules/.pnpm/@pandacss+preset-base@0.40.1/node_modules/@pandacss/preset-base/dist/index.mjs
|
|
17
17
|
init_esm_shims();
|
|
18
18
|
var conditions = {
|
|
19
19
|
hover: "&:is(:hover, [data-hover])",
|
|
@@ -2884,7 +2884,7 @@ var preset = definePreset({
|
|
|
2884
2884
|
});
|
|
2885
2885
|
var src_default = preset;
|
|
2886
2886
|
|
|
2887
|
-
// ../node_modules/.pnpm/@pandacss+preset-panda@0.
|
|
2887
|
+
// ../node_modules/.pnpm/@pandacss+preset-panda@0.40.1/node_modules/@pandacss/preset-panda/dist/index.mjs
|
|
2888
2888
|
init_esm_shims();
|
|
2889
2889
|
var breakpoints = {
|
|
2890
2890
|
sm: "640px",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/eslint-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
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,10 @@
|
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@pandacss/config": "^0.
|
|
30
|
-
"@pandacss/generator": "^0.
|
|
31
|
-
"@pandacss/node": "^0.
|
|
32
|
-
"@pandacss/shared": "^0.
|
|
29
|
+
"@pandacss/config": "^0.40.0",
|
|
30
|
+
"@pandacss/generator": "^0.40.0",
|
|
31
|
+
"@pandacss/node": "^0.40.0",
|
|
32
|
+
"@pandacss/shared": "^0.40.0",
|
|
33
33
|
"@typescript-eslint/utils": "^6.19.1",
|
|
34
34
|
"hookable": "^5.5.3",
|
|
35
35
|
"synckit": "^0.9.0"
|