@unocss/eslint-plugin 0.60.3 → 0.60.4
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/worker.mjs +8 -2
- package/package.json +6 -6
package/dist/worker.mjs
CHANGED
|
@@ -64,12 +64,18 @@ async function actionBlocklist(configPath, classes, id) {
|
|
|
64
64
|
const blocked = /* @__PURE__ */ new Map();
|
|
65
65
|
const extracted = await uno.applyExtractors(classes, id);
|
|
66
66
|
const values = [...extracted.values()];
|
|
67
|
+
const getMeta = (raw, meta) => {
|
|
68
|
+
return meta?.message ? {
|
|
69
|
+
...meta,
|
|
70
|
+
message: typeof meta.message === "function" ? meta.message(raw) : meta.message
|
|
71
|
+
} : meta;
|
|
72
|
+
};
|
|
67
73
|
const matchBlocked = async (raw) => {
|
|
68
74
|
if (blocked.has(raw))
|
|
69
75
|
return;
|
|
70
76
|
let rule = uno.getBlocked(raw);
|
|
71
77
|
if (rule) {
|
|
72
|
-
blocked.set(raw, rule[1]);
|
|
78
|
+
blocked.set(raw, getMeta(raw, rule[1]));
|
|
73
79
|
return;
|
|
74
80
|
}
|
|
75
81
|
let current = raw;
|
|
@@ -78,7 +84,7 @@ async function actionBlocklist(configPath, classes, id) {
|
|
|
78
84
|
const applied = await uno.matchVariants(raw, current);
|
|
79
85
|
rule = applied && uno.getBlocked(applied[1]);
|
|
80
86
|
if (rule)
|
|
81
|
-
blocked.set(raw, rule[1]);
|
|
87
|
+
blocked.set(raw, getMeta(raw, rule[1]));
|
|
82
88
|
};
|
|
83
89
|
await Promise.all(values.map(matchBlocked));
|
|
84
90
|
return [...blocked];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/eslint-plugin",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.60.
|
|
4
|
+
"version": "0.60.4",
|
|
5
5
|
"description": "ESLint plugin for UnoCSS",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
"node": ">=14"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@typescript-eslint/utils": "^7.
|
|
38
|
+
"@typescript-eslint/utils": "^7.11.0",
|
|
39
39
|
"magic-string": "^0.30.10",
|
|
40
40
|
"synckit": "^0.9.0",
|
|
41
|
-
"@unocss/
|
|
42
|
-
"@unocss/
|
|
41
|
+
"@unocss/core": "0.60.4",
|
|
42
|
+
"@unocss/config": "0.60.4"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"vue-eslint-parser": "^9.4.
|
|
46
|
-
"@unocss/eslint-plugin": "0.60.
|
|
45
|
+
"vue-eslint-parser": "^9.4.3",
|
|
46
|
+
"@unocss/eslint-plugin": "0.60.4"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "unbuild",
|