@tb-dev/eslint-config 10.0.3 → 10.0.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/index.js +0 -22
- package/dist/src/lib/index.d.ts +0 -1
- package/dist/src/types/config.d.ts +0 -3
- package/package.json +1 -2
- package/dist/src/lib/unocss.d.ts +0 -2
package/dist/index.js
CHANGED
|
@@ -37,7 +37,6 @@ function isEnabled(config, feature) {
|
|
|
37
37
|
switch (feature) {
|
|
38
38
|
case "perfectionist": return config?.perfectionist ?? true;
|
|
39
39
|
case "unicorn": return config?.unicorn ?? true;
|
|
40
|
-
case "unocss": return config?.unocss ?? false;
|
|
41
40
|
case "vue": return config?.vue ?? false;
|
|
42
41
|
default: return false;
|
|
43
42
|
}
|
|
@@ -263,26 +262,6 @@ async function vue(options) {
|
|
|
263
262
|
];
|
|
264
263
|
}
|
|
265
264
|
//#endregion
|
|
266
|
-
//#region src/lib/unocss.ts
|
|
267
|
-
async function unocss(options) {
|
|
268
|
-
if (!isEnabled(options.features, "unocss")) return {};
|
|
269
|
-
const plugin = (await interopDefault(import("@unocss/eslint-config/flat"))).plugins?.unocss;
|
|
270
|
-
const overrides = mapRules(options.overrides?.unocss ?? {}, (rule, value) => {
|
|
271
|
-
if (rule.startsWith("unocss/")) return [rule, value];
|
|
272
|
-
else return [`unocss/${rule}`, value];
|
|
273
|
-
});
|
|
274
|
-
return {
|
|
275
|
-
plugins: { unocss: plugin },
|
|
276
|
-
rules: {
|
|
277
|
-
"unocss/blocklist": "off",
|
|
278
|
-
"unocss/enforce-class-compile": "off",
|
|
279
|
-
"unocss/order": "error",
|
|
280
|
-
"unocss/order-attributify": "off",
|
|
281
|
-
...overrides
|
|
282
|
-
}
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
//#endregion
|
|
286
265
|
//#region src/lib/unicorn.ts
|
|
287
266
|
/**
|
|
288
267
|
* @see https://github.com/sindresorhus/eslint-plugin-unicorn#rules
|
|
@@ -861,7 +840,6 @@ async function defineConfig(options) {
|
|
|
861
840
|
...await vue(options),
|
|
862
841
|
perfectionist(options),
|
|
863
842
|
unicorn(options),
|
|
864
|
-
unocss(options),
|
|
865
843
|
ignores
|
|
866
844
|
]);
|
|
867
845
|
}
|
package/dist/src/lib/index.d.ts
CHANGED
|
@@ -4,8 +4,6 @@ export interface FeaturesObject {
|
|
|
4
4
|
/** @default true */
|
|
5
5
|
unicorn?: boolean;
|
|
6
6
|
/** @default false */
|
|
7
|
-
unocss?: boolean;
|
|
8
|
-
/** @default false */
|
|
9
7
|
vue?: boolean;
|
|
10
8
|
}
|
|
11
9
|
export interface ConfigOptions {
|
|
@@ -18,7 +16,6 @@ export interface ConfigOptions {
|
|
|
18
16
|
perfectionist?: Rules;
|
|
19
17
|
typescript?: Rules;
|
|
20
18
|
unicorn?: Rules;
|
|
21
|
-
unocss?: Rules;
|
|
22
19
|
vue?: Rules;
|
|
23
20
|
};
|
|
24
21
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tb-dev/eslint-config",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.4",
|
|
4
4
|
"description": "ESLint config",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@typescript-eslint/eslint-plugin": "^8.58.0",
|
|
23
23
|
"@typescript-eslint/parser": "^8.58.0",
|
|
24
|
-
"@unocss/eslint-config": "^66.6.7",
|
|
25
24
|
"eslint-plugin-perfectionist": "^5.8.0",
|
|
26
25
|
"eslint-plugin-unicorn": "^64.0.0",
|
|
27
26
|
"eslint-plugin-vue": "^10.8.0",
|
package/dist/src/lib/unocss.d.ts
DELETED