@pandacss/eslint-plugin 0.2.13 → 0.2.14
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 +6 -1
- package/dist/index.mjs +6 -1
- package/package.json +1 -1
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.14";
|
|
7888
7888
|
|
|
7889
7889
|
// src/configs/all.ts
|
|
7890
7890
|
init_cjs_shims();
|
|
@@ -8698,6 +8698,10 @@ var rule7 = createRule({
|
|
|
8698
8698
|
const tokens = extractTokens(value);
|
|
8699
8699
|
return tokens.length > 0;
|
|
8700
8700
|
};
|
|
8701
|
+
const isCssVariable = (value) => {
|
|
8702
|
+
if (!value) return false;
|
|
8703
|
+
return value.trim().startsWith("var(");
|
|
8704
|
+
};
|
|
8701
8705
|
const isValidColorToken = (value) => {
|
|
8702
8706
|
if (!value) return false;
|
|
8703
8707
|
const [colorToken, opacity] = value.split("/");
|
|
@@ -8717,6 +8721,7 @@ var rule7 = createRule({
|
|
|
8717
8721
|
const checkColorValue = (node, value, attributeName) => {
|
|
8718
8722
|
if (!isColorAttribute2(attributeName)) return;
|
|
8719
8723
|
if (isTokenFunctionUsed(value)) return;
|
|
8724
|
+
if (isCssVariable(value)) return;
|
|
8720
8725
|
if (isValidColorToken(value)) return;
|
|
8721
8726
|
reportInvalidColor(node, value);
|
|
8722
8727
|
};
|
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.14";
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
|
|
@@ -8736,6 +8736,10 @@ var init_no_hardcoded_color = __esm({
|
|
|
8736
8736
|
const tokens = extractTokens(value);
|
|
8737
8737
|
return tokens.length > 0;
|
|
8738
8738
|
};
|
|
8739
|
+
const isCssVariable = (value) => {
|
|
8740
|
+
if (!value) return false;
|
|
8741
|
+
return value.trim().startsWith("var(");
|
|
8742
|
+
};
|
|
8739
8743
|
const isValidColorToken = (value) => {
|
|
8740
8744
|
if (!value) return false;
|
|
8741
8745
|
const [colorToken, opacity] = value.split("/");
|
|
@@ -8755,6 +8759,7 @@ var init_no_hardcoded_color = __esm({
|
|
|
8755
8759
|
const checkColorValue = (node, value, attributeName) => {
|
|
8756
8760
|
if (!isColorAttribute2(attributeName)) return;
|
|
8757
8761
|
if (isTokenFunctionUsed(value)) return;
|
|
8762
|
+
if (isCssVariable(value)) return;
|
|
8758
8763
|
if (isValidColorToken(value)) return;
|
|
8759
8764
|
reportInvalidColor(node, value);
|
|
8760
8765
|
};
|