@unocss/eslint-plugin 66.4.1 → 66.5.0
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.cjs +17 -3
- package/dist/index.mjs +17 -3
- package/package.json +7 -7
package/dist/index.cjs
CHANGED
|
@@ -288,7 +288,8 @@ const order = createRule({
|
|
|
288
288
|
type: "array",
|
|
289
289
|
items: { type: "string" }
|
|
290
290
|
}
|
|
291
|
-
}
|
|
291
|
+
},
|
|
292
|
+
additionalProperties: false
|
|
292
293
|
}
|
|
293
294
|
]
|
|
294
295
|
},
|
|
@@ -460,10 +461,23 @@ const order = createRule({
|
|
|
460
461
|
if (arg.type === "LogicalExpression") {
|
|
461
462
|
return checkPossibleLiteral(arg.left, arg.right);
|
|
462
463
|
}
|
|
463
|
-
|
|
464
|
-
|
|
464
|
+
function handleObjectExpression(node2) {
|
|
465
|
+
node2.properties.forEach((p) => {
|
|
466
|
+
if (p.type !== "Property")
|
|
467
|
+
return;
|
|
468
|
+
if (isPossibleLiteral(p.value)) {
|
|
469
|
+
return checkPossibleLiteral(p.value);
|
|
470
|
+
}
|
|
471
|
+
if (p.value.type === "ObjectExpression") {
|
|
472
|
+
return handleObjectExpression(p.value);
|
|
473
|
+
}
|
|
474
|
+
});
|
|
475
|
+
const keys = node2.properties.filter((p) => p.type === "Property").map((p) => p.key);
|
|
465
476
|
return checkPossibleLiteral(...keys);
|
|
466
477
|
}
|
|
478
|
+
if (arg.type === "ObjectExpression") {
|
|
479
|
+
return handleObjectExpression(arg);
|
|
480
|
+
}
|
|
467
481
|
});
|
|
468
482
|
},
|
|
469
483
|
// https://typescript-eslint.io/play/#ts=5.8.2&showAST=es&fileType=.tsx&code=MYewdgzgLgBApgDygJwIYGEA2qIQHKoC2cMAvDAOQBeAtAIwAMDFAUCwPTswBuqyAlqgBGmEgBM4wbGij9wLUJFhSIAIQCuUKODKVCyeq0XQYKjVvAAmXQAN99GABIA3ohQZsuAsQC%2BNheAmZpraYADMtvZ0Tq5IaFg4%2BERwfjA4poFQbJwwIEIAVpKwElJ8qLLyxrBCUGAJXskQus4sMDASAGao6phQAFx6mDSWAA4IFAA0rTAA7vxQABYAonGoAzYdoggw83CEEDTAcGBQcMgwQgDmNDMLuzCnSDQiqMAA1jFu8Z5JvjZTbQQAxabTaAE8BhRCENRuNpj4WAiOFx0lV2pJpOU5GAAkoLrV6r84BBrOQQeiuj1%2BoNhmNJtMgTByeDIdDaXC2gifGkmlUgA&eslintrc=N4KABGBEBOCuA2BTAzpAXGYBfEWg&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false
|
package/dist/index.mjs
CHANGED
|
@@ -282,7 +282,8 @@ const order = createRule({
|
|
|
282
282
|
type: "array",
|
|
283
283
|
items: { type: "string" }
|
|
284
284
|
}
|
|
285
|
-
}
|
|
285
|
+
},
|
|
286
|
+
additionalProperties: false
|
|
286
287
|
}
|
|
287
288
|
]
|
|
288
289
|
},
|
|
@@ -454,10 +455,23 @@ const order = createRule({
|
|
|
454
455
|
if (arg.type === "LogicalExpression") {
|
|
455
456
|
return checkPossibleLiteral(arg.left, arg.right);
|
|
456
457
|
}
|
|
457
|
-
|
|
458
|
-
|
|
458
|
+
function handleObjectExpression(node2) {
|
|
459
|
+
node2.properties.forEach((p) => {
|
|
460
|
+
if (p.type !== "Property")
|
|
461
|
+
return;
|
|
462
|
+
if (isPossibleLiteral(p.value)) {
|
|
463
|
+
return checkPossibleLiteral(p.value);
|
|
464
|
+
}
|
|
465
|
+
if (p.value.type === "ObjectExpression") {
|
|
466
|
+
return handleObjectExpression(p.value);
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
const keys = node2.properties.filter((p) => p.type === "Property").map((p) => p.key);
|
|
459
470
|
return checkPossibleLiteral(...keys);
|
|
460
471
|
}
|
|
472
|
+
if (arg.type === "ObjectExpression") {
|
|
473
|
+
return handleObjectExpression(arg);
|
|
474
|
+
}
|
|
461
475
|
});
|
|
462
476
|
},
|
|
463
477
|
// https://typescript-eslint.io/play/#ts=5.8.2&showAST=es&fileType=.tsx&code=MYewdgzgLgBApgDygJwIYGEA2qIQHKoC2cMAvDAOQBeAtAIwAMDFAUCwPTswBuqyAlqgBGmEgBM4wbGij9wLUJFhSIAIQCuUKODKVCyeq0XQYKjVvAAmXQAN99GABIA3ohQZsuAsQC%2BNheAmZpraYADMtvZ0Tq5IaFg4%2BERwfjA4poFQbJwwIEIAVpKwElJ8qLLyxrBCUGAJXskQus4sMDASAGao6phQAFx6mDSWAA4IFAA0rTAA7vxQABYAonGoAzYdoggw83CEEDTAcGBQcMgwQgDmNDMLuzCnSDQiqMAA1jFu8Z5JvjZTbQQAxabTaAE8BhRCENRuNpj4WAiOFx0lV2pJpOU5GAAkoLrV6r84BBrOQQeiuj1%2BoNhmNJtMgTByeDIdDaXC2gifGkmlUgA&eslintrc=N4KABGBEBOCuA2BTAzpAXGYBfEWg&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/eslint-plugin",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "66.
|
|
4
|
+
"version": "66.5.0",
|
|
5
5
|
"description": "ESLint plugin for UnoCSS",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
"node": ">=14"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@typescript-eslint/utils": "^8.
|
|
39
|
-
"magic-string": "^0.30.
|
|
38
|
+
"@typescript-eslint/utils": "^8.41.0",
|
|
39
|
+
"magic-string": "^0.30.18",
|
|
40
40
|
"synckit": "^0.11.11",
|
|
41
|
-
"@unocss/config": "66.
|
|
42
|
-
"@unocss/
|
|
43
|
-
"@unocss/
|
|
41
|
+
"@unocss/config": "66.5.0",
|
|
42
|
+
"@unocss/core": "66.5.0",
|
|
43
|
+
"@unocss/rule-utils": "66.5.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@typescript/native-preview": "latest",
|
|
47
47
|
"svelte-eslint-parser": "^1.3.1",
|
|
48
48
|
"vue-eslint-parser": "^10.2.0",
|
|
49
|
-
"@unocss/eslint-plugin": "66.
|
|
49
|
+
"@unocss/eslint-plugin": "66.5.0"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "unbuild",
|