@unocss/eslint-plugin 66.6.6 → 66.6.8
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 +206 -226
- package/dist/index.d.cts +42 -60
- package/dist/index.d.mts +42 -60
- package/dist/index.mjs +196 -217
- package/dist/worker.mjs +5 -8
- package/package.json +9 -10
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,44 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { LooseRuleDefinition } from "@typescript-eslint/utils/ts-eslint";
|
|
2
|
+
import { Linter } from "eslint";
|
|
2
3
|
|
|
3
4
|
//#region src/types.d.ts
|
|
5
|
+
type UnocssEnforceClassCompile = [] | [{
|
|
6
|
+
prefix?: string;
|
|
7
|
+
enableFix?: boolean;
|
|
8
|
+
}];
|
|
9
|
+
type UnocssOrder = [] | [{
|
|
10
|
+
unoFunctions?: string[];
|
|
11
|
+
unoVariables?: string[];
|
|
12
|
+
}];
|
|
13
|
+
interface UnoCSSEslintPlugin {
|
|
14
|
+
rules: Record<string, LooseRuleDefinition>;
|
|
15
|
+
}
|
|
16
|
+
interface UnoCSSEslintFlatConfig extends Linter.Config {
|
|
17
|
+
plugins: {
|
|
18
|
+
unocss: any;
|
|
19
|
+
};
|
|
20
|
+
rules: {
|
|
21
|
+
readonly 'unocss/order': Linter.RuleEntry<UnocssOrder>;
|
|
22
|
+
readonly 'unocss/order-attributify': Linter.RuleEntry<[]>;
|
|
23
|
+
readonly 'unocss/blocklist'?: Linter.RuleEntry<[]>;
|
|
24
|
+
readonly 'unocss/enforce-class-compile'?: Linter.RuleEntry<UnocssEnforceClassCompile>;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
interface UnoCSSEslintRecommendedConfig extends Linter.LegacyConfig {
|
|
28
|
+
rules: {
|
|
29
|
+
readonly '@unocss/order': Linter.RuleEntry<UnocssOrder>;
|
|
30
|
+
readonly '@unocss/order-attributify': Linter.RuleEntry<[]>;
|
|
31
|
+
readonly '@unocss/blocklist'?: Linter.RuleEntry<[]>;
|
|
32
|
+
readonly '@unocss/enforce-class-compile'?: Linter.RuleEntry<UnocssEnforceClassCompile>;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
interface UnoCSSEslintConfigs {
|
|
36
|
+
recommended: UnoCSSEslintRecommendedConfig;
|
|
37
|
+
flat: UnoCSSEslintFlatConfig;
|
|
38
|
+
}
|
|
39
|
+
interface UnoCSSEslintPluginModule extends UnoCSSEslintPlugin {
|
|
40
|
+
configs: UnoCSSEslintConfigs;
|
|
41
|
+
}
|
|
4
42
|
declare module '@typescript-eslint/utils/ts-eslint' {
|
|
5
43
|
interface SharedConfigurationSettings {
|
|
6
44
|
unocss?: {
|
|
@@ -10,63 +48,7 @@ declare module '@typescript-eslint/utils/ts-eslint' {
|
|
|
10
48
|
}
|
|
11
49
|
//#endregion
|
|
12
50
|
//#region src/index.d.ts
|
|
13
|
-
declare const configs:
|
|
14
|
-
|
|
15
|
-
plugins: string[];
|
|
16
|
-
rules: {
|
|
17
|
-
readonly '@unocss/order': "warn";
|
|
18
|
-
readonly '@unocss/order-attributify': "warn";
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
flat: {
|
|
22
|
-
plugins: {
|
|
23
|
-
unocss: {
|
|
24
|
-
rules: {
|
|
25
|
-
order: _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
26
|
-
'order-attributify': _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
27
|
-
blocklist: _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
28
|
-
'enforce-class-compile': _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
rules: {
|
|
33
|
-
readonly 'unocss/order': "warn";
|
|
34
|
-
readonly 'unocss/order-attributify': "warn";
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
declare const _default: {
|
|
39
|
-
configs: {
|
|
40
|
-
recommended: {
|
|
41
|
-
plugins: string[];
|
|
42
|
-
rules: {
|
|
43
|
-
readonly '@unocss/order': "warn";
|
|
44
|
-
readonly '@unocss/order-attributify': "warn";
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
flat: {
|
|
48
|
-
plugins: {
|
|
49
|
-
unocss: {
|
|
50
|
-
rules: {
|
|
51
|
-
order: _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
52
|
-
'order-attributify': _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
53
|
-
blocklist: _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
54
|
-
'enforce-class-compile': _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
rules: {
|
|
59
|
-
readonly 'unocss/order': "warn";
|
|
60
|
-
readonly 'unocss/order-attributify': "warn";
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
rules: {
|
|
65
|
-
order: _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
66
|
-
'order-attributify': _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
67
|
-
blocklist: _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
68
|
-
'enforce-class-compile': _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
51
|
+
declare const configs: UnoCSSEslintConfigs;
|
|
52
|
+
declare const eslintPlugin: UnoCSSEslintPluginModule;
|
|
71
53
|
//#endregion
|
|
72
|
-
export { configs,
|
|
54
|
+
export { type UnoCSSEslintConfigs, type UnoCSSEslintFlatConfig, type UnoCSSEslintPlugin, type UnoCSSEslintPluginModule, type UnoCSSEslintRecommendedConfig, configs, eslintPlugin as default };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,44 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { LooseRuleDefinition } from "@typescript-eslint/utils/ts-eslint";
|
|
2
|
+
import { Linter } from "eslint";
|
|
2
3
|
|
|
3
4
|
//#region src/types.d.ts
|
|
5
|
+
type UnocssEnforceClassCompile = [] | [{
|
|
6
|
+
prefix?: string;
|
|
7
|
+
enableFix?: boolean;
|
|
8
|
+
}];
|
|
9
|
+
type UnocssOrder = [] | [{
|
|
10
|
+
unoFunctions?: string[];
|
|
11
|
+
unoVariables?: string[];
|
|
12
|
+
}];
|
|
13
|
+
interface UnoCSSEslintPlugin {
|
|
14
|
+
rules: Record<string, LooseRuleDefinition>;
|
|
15
|
+
}
|
|
16
|
+
interface UnoCSSEslintFlatConfig extends Linter.Config {
|
|
17
|
+
plugins: {
|
|
18
|
+
unocss: any;
|
|
19
|
+
};
|
|
20
|
+
rules: {
|
|
21
|
+
readonly 'unocss/order': Linter.RuleEntry<UnocssOrder>;
|
|
22
|
+
readonly 'unocss/order-attributify': Linter.RuleEntry<[]>;
|
|
23
|
+
readonly 'unocss/blocklist'?: Linter.RuleEntry<[]>;
|
|
24
|
+
readonly 'unocss/enforce-class-compile'?: Linter.RuleEntry<UnocssEnforceClassCompile>;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
interface UnoCSSEslintRecommendedConfig extends Linter.LegacyConfig {
|
|
28
|
+
rules: {
|
|
29
|
+
readonly '@unocss/order': Linter.RuleEntry<UnocssOrder>;
|
|
30
|
+
readonly '@unocss/order-attributify': Linter.RuleEntry<[]>;
|
|
31
|
+
readonly '@unocss/blocklist'?: Linter.RuleEntry<[]>;
|
|
32
|
+
readonly '@unocss/enforce-class-compile'?: Linter.RuleEntry<UnocssEnforceClassCompile>;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
interface UnoCSSEslintConfigs {
|
|
36
|
+
recommended: UnoCSSEslintRecommendedConfig;
|
|
37
|
+
flat: UnoCSSEslintFlatConfig;
|
|
38
|
+
}
|
|
39
|
+
interface UnoCSSEslintPluginModule extends UnoCSSEslintPlugin {
|
|
40
|
+
configs: UnoCSSEslintConfigs;
|
|
41
|
+
}
|
|
4
42
|
declare module '@typescript-eslint/utils/ts-eslint' {
|
|
5
43
|
interface SharedConfigurationSettings {
|
|
6
44
|
unocss?: {
|
|
@@ -10,63 +48,7 @@ declare module '@typescript-eslint/utils/ts-eslint' {
|
|
|
10
48
|
}
|
|
11
49
|
//#endregion
|
|
12
50
|
//#region src/index.d.ts
|
|
13
|
-
declare const configs:
|
|
14
|
-
|
|
15
|
-
plugins: string[];
|
|
16
|
-
rules: {
|
|
17
|
-
readonly '@unocss/order': "warn";
|
|
18
|
-
readonly '@unocss/order-attributify': "warn";
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
flat: {
|
|
22
|
-
plugins: {
|
|
23
|
-
unocss: {
|
|
24
|
-
rules: {
|
|
25
|
-
order: _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
26
|
-
'order-attributify': _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
27
|
-
blocklist: _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
28
|
-
'enforce-class-compile': _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
rules: {
|
|
33
|
-
readonly 'unocss/order': "warn";
|
|
34
|
-
readonly 'unocss/order-attributify': "warn";
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
declare const _default: {
|
|
39
|
-
configs: {
|
|
40
|
-
recommended: {
|
|
41
|
-
plugins: string[];
|
|
42
|
-
rules: {
|
|
43
|
-
readonly '@unocss/order': "warn";
|
|
44
|
-
readonly '@unocss/order-attributify': "warn";
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
flat: {
|
|
48
|
-
plugins: {
|
|
49
|
-
unocss: {
|
|
50
|
-
rules: {
|
|
51
|
-
order: _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
52
|
-
'order-attributify': _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
53
|
-
blocklist: _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
54
|
-
'enforce-class-compile': _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
rules: {
|
|
59
|
-
readonly 'unocss/order': "warn";
|
|
60
|
-
readonly 'unocss/order-attributify': "warn";
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
rules: {
|
|
65
|
-
order: _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
66
|
-
'order-attributify': _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
67
|
-
blocklist: _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
68
|
-
'enforce-class-compile': _typescript_eslint_utils_ts_eslint0.AnyRuleModule;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
51
|
+
declare const configs: UnoCSSEslintConfigs;
|
|
52
|
+
declare const eslintPlugin: UnoCSSEslintPluginModule;
|
|
71
53
|
//#endregion
|
|
72
|
-
export { configs,
|
|
54
|
+
export { type UnoCSSEslintConfigs, type UnoCSSEslintFlatConfig, type UnoCSSEslintPlugin, type UnoCSSEslintPluginModule, type UnoCSSEslintRecommendedConfig, configs, eslintPlugin as default };
|