@unocss/eslint-plugin 0.55.7 → 0.56.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.
- package/dist/dirs.cjs +2 -1
- package/dist/dirs.d.cts +3 -0
- package/dist/dirs.d.mts +3 -0
- package/dist/dirs.d.ts +3 -0
- package/dist/index.cjs +20 -0
- package/dist/index.d.cts +20 -0
- package/dist/index.d.mts +20 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.mjs +20 -0
- package/dist/worker.d.cts +7 -0
- package/dist/worker.d.mts +7 -0
- package/dist/worker.d.ts +7 -0
- package/package.json +5 -5
package/dist/dirs.cjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const node_url = require('node:url');
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
6
|
+
const distDir = node_url.fileURLToPath(new URL("../dist", (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('dirs.cjs', document.baseURI).href))));
|
|
6
7
|
|
|
7
8
|
exports.distDir = distDir;
|
package/dist/dirs.d.cts
ADDED
package/dist/dirs.d.mts
ADDED
package/dist/dirs.d.ts
ADDED
package/dist/index.cjs
CHANGED
|
@@ -183,6 +183,26 @@ const blocklist = utils.ESLintUtils.RuleCreator((name) => name)({
|
|
|
183
183
|
if (node.value.type === "VLiteral")
|
|
184
184
|
checkLiteral(node.value);
|
|
185
185
|
}
|
|
186
|
+
},
|
|
187
|
+
// Attributify
|
|
188
|
+
VStartTag(node) {
|
|
189
|
+
const valueless = node.attributes.filter((i) => typeof i.key?.name === "string" && !IGNORE_ATTRIBUTES.includes(i.key?.name?.toLowerCase()) && i.value == null);
|
|
190
|
+
if (!valueless.length)
|
|
191
|
+
return;
|
|
192
|
+
for (const node2 of valueless) {
|
|
193
|
+
if (!node2?.key?.name)
|
|
194
|
+
continue;
|
|
195
|
+
const blocked = syncAction("blocklist", node2.key.name, context.filename);
|
|
196
|
+
blocked.forEach((i) => {
|
|
197
|
+
context.report({
|
|
198
|
+
node: node2,
|
|
199
|
+
messageId: "in-blocklist",
|
|
200
|
+
data: {
|
|
201
|
+
name: i
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
}
|
|
186
206
|
}
|
|
187
207
|
};
|
|
188
208
|
if (context.parserServices == null || context.parserServices.defineTemplateBodyVisitor == null) {
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as _typescript_eslint_utils_eslint_utils from '@typescript-eslint/utils/eslint-utils';
|
|
2
|
+
|
|
3
|
+
declare const _default: {
|
|
4
|
+
rules: {
|
|
5
|
+
order: _typescript_eslint_utils_eslint_utils.RuleWithMeta<[], "">;
|
|
6
|
+
'order-attributify': _typescript_eslint_utils_eslint_utils.RuleWithMeta<[], "">;
|
|
7
|
+
blocklist: _typescript_eslint_utils_eslint_utils.RuleWithMeta<[], "">;
|
|
8
|
+
};
|
|
9
|
+
configs: {
|
|
10
|
+
recommended: {
|
|
11
|
+
plugins: string[];
|
|
12
|
+
rules: {
|
|
13
|
+
'@unocss/order': string;
|
|
14
|
+
'@unocss/order-attributify': string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { _default as default };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as _typescript_eslint_utils_eslint_utils from '@typescript-eslint/utils/eslint-utils';
|
|
2
|
+
|
|
3
|
+
declare const _default: {
|
|
4
|
+
rules: {
|
|
5
|
+
order: _typescript_eslint_utils_eslint_utils.RuleWithMeta<[], "">;
|
|
6
|
+
'order-attributify': _typescript_eslint_utils_eslint_utils.RuleWithMeta<[], "">;
|
|
7
|
+
blocklist: _typescript_eslint_utils_eslint_utils.RuleWithMeta<[], "">;
|
|
8
|
+
};
|
|
9
|
+
configs: {
|
|
10
|
+
recommended: {
|
|
11
|
+
plugins: string[];
|
|
12
|
+
rules: {
|
|
13
|
+
'@unocss/order': string;
|
|
14
|
+
'@unocss/order-attributify': string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { _default as default };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as _typescript_eslint_utils_eslint_utils from '@typescript-eslint/utils/eslint-utils';
|
|
2
|
+
|
|
3
|
+
declare const _default: {
|
|
4
|
+
rules: {
|
|
5
|
+
order: _typescript_eslint_utils_eslint_utils.RuleWithMeta<[], "">;
|
|
6
|
+
'order-attributify': _typescript_eslint_utils_eslint_utils.RuleWithMeta<[], "">;
|
|
7
|
+
blocklist: _typescript_eslint_utils_eslint_utils.RuleWithMeta<[], "">;
|
|
8
|
+
};
|
|
9
|
+
configs: {
|
|
10
|
+
recommended: {
|
|
11
|
+
plugins: string[];
|
|
12
|
+
rules: {
|
|
13
|
+
'@unocss/order': string;
|
|
14
|
+
'@unocss/order-attributify': string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { _default as default };
|
package/dist/index.mjs
CHANGED
|
@@ -177,6 +177,26 @@ const blocklist = ESLintUtils.RuleCreator((name) => name)({
|
|
|
177
177
|
if (node.value.type === "VLiteral")
|
|
178
178
|
checkLiteral(node.value);
|
|
179
179
|
}
|
|
180
|
+
},
|
|
181
|
+
// Attributify
|
|
182
|
+
VStartTag(node) {
|
|
183
|
+
const valueless = node.attributes.filter((i) => typeof i.key?.name === "string" && !IGNORE_ATTRIBUTES.includes(i.key?.name?.toLowerCase()) && i.value == null);
|
|
184
|
+
if (!valueless.length)
|
|
185
|
+
return;
|
|
186
|
+
for (const node2 of valueless) {
|
|
187
|
+
if (!node2?.key?.name)
|
|
188
|
+
continue;
|
|
189
|
+
const blocked = syncAction("blocklist", node2.key.name, context.filename);
|
|
190
|
+
blocked.forEach((i) => {
|
|
191
|
+
context.report({
|
|
192
|
+
node: node2,
|
|
193
|
+
messageId: "in-blocklist",
|
|
194
|
+
data: {
|
|
195
|
+
name: i
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
}
|
|
180
200
|
}
|
|
181
201
|
};
|
|
182
202
|
if (context.parserServices == null || context.parserServices.defineTemplateBodyVisitor == null) {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UnoGenerator } from '@unocss/core';
|
|
2
|
+
|
|
3
|
+
declare function getGenerator(): Promise<UnoGenerator<any>>;
|
|
4
|
+
declare function run(action: 'sort', classes: string): string;
|
|
5
|
+
declare function run(action: 'blocklist', classes: string, id?: string): string[];
|
|
6
|
+
|
|
7
|
+
export { getGenerator, run };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UnoGenerator } from '@unocss/core';
|
|
2
|
+
|
|
3
|
+
declare function getGenerator(): Promise<UnoGenerator<any>>;
|
|
4
|
+
declare function run(action: 'sort', classes: string): string;
|
|
5
|
+
declare function run(action: 'blocklist', classes: string, id?: string): string[];
|
|
6
|
+
|
|
7
|
+
export { getGenerator, run };
|
package/dist/worker.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UnoGenerator } from '@unocss/core';
|
|
2
|
+
|
|
3
|
+
declare function getGenerator(): Promise<UnoGenerator<any>>;
|
|
4
|
+
declare function run(action: 'sort', classes: string): string;
|
|
5
|
+
declare function run(action: 'blocklist', classes: string, id?: string): string[];
|
|
6
|
+
|
|
7
|
+
export { getGenerator, run };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/eslint-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.56.1",
|
|
4
4
|
"description": "ESLint plugin for UnoCSS",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"node": ">=14"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@typescript-eslint/utils": "^6.
|
|
37
|
+
"@typescript-eslint/utils": "^6.7.2",
|
|
38
38
|
"magic-string": "^0.30.3",
|
|
39
39
|
"synckit": "^0.8.5",
|
|
40
|
-
"@unocss/config": "0.
|
|
41
|
-
"@unocss/core": "0.
|
|
40
|
+
"@unocss/config": "0.56.1",
|
|
41
|
+
"@unocss/core": "0.56.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@unocss/eslint-plugin": "0.
|
|
44
|
+
"@unocss/eslint-plugin": "0.56.1"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "unbuild",
|