@unocss/eslint-plugin 0.64.1 → 0.65.0-beta.1

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.
Files changed (2) hide show
  1. package/dist/worker.mjs +7 -5
  2. package/package.json +4 -4
package/dist/worker.mjs CHANGED
@@ -73,7 +73,7 @@ async function actionBlocklist(configPath, classes, id) {
73
73
  const matchBlocked = async (raw) => {
74
74
  if (blocked.has(raw))
75
75
  return;
76
- let rule = uno.getBlocked(raw);
76
+ const rule = uno.getBlocked(raw);
77
77
  if (rule) {
78
78
  blocked.set(raw, getMeta(raw, rule[1]));
79
79
  return;
@@ -81,10 +81,12 @@ async function actionBlocklist(configPath, classes, id) {
81
81
  let current = raw;
82
82
  for (const p of uno.config.preprocess)
83
83
  current = p(raw);
84
- const applied = await uno.matchVariants(raw, current);
85
- rule = applied && uno.getBlocked(applied[1]);
86
- if (rule)
87
- blocked.set(raw, getMeta(raw, rule[1]));
84
+ const results = await uno.matchVariants(raw, current);
85
+ const rules = results.map((r) => r && uno.getBlocked(r[1]));
86
+ for (const rule2 of rules) {
87
+ if (rule2)
88
+ blocked.set(raw, getMeta(raw, rule2[1]));
89
+ }
88
90
  };
89
91
  await Promise.all(values.map(matchBlocked));
90
92
  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.64.1",
4
+ "version": "0.65.0-beta.1",
5
5
  "description": "ESLint plugin for UnoCSS",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -38,12 +38,12 @@
38
38
  "@typescript-eslint/utils": "^8.12.2",
39
39
  "magic-string": "^0.30.12",
40
40
  "synckit": "^0.9.2",
41
- "@unocss/config": "0.64.1",
42
- "@unocss/core": "0.64.1"
41
+ "@unocss/core": "0.65.0-beta.1",
42
+ "@unocss/config": "0.65.0-beta.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "vue-eslint-parser": "^9.4.3",
46
- "@unocss/eslint-plugin": "0.64.1"
46
+ "@unocss/eslint-plugin": "0.65.0-beta.1"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "unbuild",