@icebreakers/eslint-config 5.0.2 → 5.0.3
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/README.md +1 -1
- package/README.zh.md +1 -1
- package/dist/index.cjs +2 -46
- package/dist/index.js +2 -46
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -124,7 +124,7 @@ Mini Program templates. It enables the following defaults:
|
|
|
124
124
|
|
|
125
125
|
- injects readonly globals for `wx`, `Page`, `App`, `Component`, `getApp`, `getCurrentPages`, `requirePlugin`, and `WechatMiniprogram`
|
|
126
126
|
- ignores `dist/**`, `.weapp-vite/**`, `miniprogram_npm/**`, `node_modules/**`, `project.config.json`, and `project.private.config.json`
|
|
127
|
-
- when `vue: true` is also enabled,
|
|
127
|
+
- when `vue: true` is also enabled, disables `vue/no-deprecated-slot-attribute`, `vue/no-useless-template-attributes`, and `vue/singleline-html-element-content-newline` so native Mini Program slot projection and compiler-only slot attributes are allowed
|
|
128
128
|
|
|
129
129
|
#### Native Mini Program Minimal Config
|
|
130
130
|
|
package/README.zh.md
CHANGED
|
@@ -145,7 +145,7 @@ export default icebreaker({
|
|
|
145
145
|
|
|
146
146
|
- 注入 `wx`、`Page`、`App`、`Component`、`getApp`、`getCurrentPages`、`requirePlugin`、`WechatMiniprogram` 全局变量
|
|
147
147
|
- 忽略 `dist/**`、`.weapp-vite/**`、`miniprogram_npm/**`、`node_modules/**`、`project.config.json`、`project.private.config.json`
|
|
148
|
-
- 当同时开启 `vue: true`
|
|
148
|
+
- 当同时开启 `vue: true` 时,关闭 `vue/no-deprecated-slot-attribute`、`vue/no-useless-template-attributes` 与 `vue/singleline-html-element-content-newline`,允许小程序原生 slot 投影和编译器专用的 slot 属性
|
|
149
149
|
|
|
150
150
|
#### 原生小程序最小配置
|
|
151
151
|
|
package/dist/index.cjs
CHANGED
|
@@ -13,46 +13,6 @@ var antfu_exports = /* @__PURE__ */ require_chunk.__exportAll({});
|
|
|
13
13
|
require_chunk.__reExport(antfu_exports, require("@antfu/eslint-config"));
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/defaults.ts
|
|
16
|
-
const INLINE_ELEMENTS = [
|
|
17
|
-
"a",
|
|
18
|
-
"abbr",
|
|
19
|
-
"audio",
|
|
20
|
-
"b",
|
|
21
|
-
"bdi",
|
|
22
|
-
"bdo",
|
|
23
|
-
"canvas",
|
|
24
|
-
"cite",
|
|
25
|
-
"code",
|
|
26
|
-
"data",
|
|
27
|
-
"del",
|
|
28
|
-
"dfn",
|
|
29
|
-
"em",
|
|
30
|
-
"i",
|
|
31
|
-
"iframe",
|
|
32
|
-
"ins",
|
|
33
|
-
"kbd",
|
|
34
|
-
"label",
|
|
35
|
-
"map",
|
|
36
|
-
"mark",
|
|
37
|
-
"noscript",
|
|
38
|
-
"object",
|
|
39
|
-
"output",
|
|
40
|
-
"picture",
|
|
41
|
-
"q",
|
|
42
|
-
"ruby",
|
|
43
|
-
"s",
|
|
44
|
-
"samp",
|
|
45
|
-
"small",
|
|
46
|
-
"span",
|
|
47
|
-
"strong",
|
|
48
|
-
"sub",
|
|
49
|
-
"sup",
|
|
50
|
-
"svg",
|
|
51
|
-
"time",
|
|
52
|
-
"u",
|
|
53
|
-
"var",
|
|
54
|
-
"video"
|
|
55
|
-
];
|
|
56
16
|
const nestjsTypeScriptRules = {
|
|
57
17
|
"ts/explicit-function-return-type": "off",
|
|
58
18
|
"ts/explicit-module-boundary-types": "off",
|
|
@@ -91,13 +51,9 @@ function getDefaultVueOptions(opts) {
|
|
|
91
51
|
};
|
|
92
52
|
if (opts?.ionic) overrides["vue/no-deprecated-slot-attribute"] = "off";
|
|
93
53
|
if (isMiniProgramEnabled(opts)) {
|
|
54
|
+
overrides["vue/no-deprecated-slot-attribute"] = "off";
|
|
94
55
|
overrides["vue/no-useless-template-attributes"] = "off";
|
|
95
|
-
overrides["vue/singleline-html-element-content-newline"] =
|
|
96
|
-
ignoreWhenNoAttributes: true,
|
|
97
|
-
ignoreWhenEmpty: true,
|
|
98
|
-
ignores: ["text", ...INLINE_ELEMENTS],
|
|
99
|
-
externalIgnores: []
|
|
100
|
-
}];
|
|
56
|
+
overrides["vue/singleline-html-element-content-newline"] = "off";
|
|
101
57
|
}
|
|
102
58
|
return { overrides };
|
|
103
59
|
}
|
package/dist/index.js
CHANGED
|
@@ -10,46 +10,6 @@ import * as import__antfu_eslint_config from "@antfu/eslint-config";
|
|
|
10
10
|
__reExport(antfu_exports, import__antfu_eslint_config);
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/defaults.ts
|
|
13
|
-
const INLINE_ELEMENTS = [
|
|
14
|
-
"a",
|
|
15
|
-
"abbr",
|
|
16
|
-
"audio",
|
|
17
|
-
"b",
|
|
18
|
-
"bdi",
|
|
19
|
-
"bdo",
|
|
20
|
-
"canvas",
|
|
21
|
-
"cite",
|
|
22
|
-
"code",
|
|
23
|
-
"data",
|
|
24
|
-
"del",
|
|
25
|
-
"dfn",
|
|
26
|
-
"em",
|
|
27
|
-
"i",
|
|
28
|
-
"iframe",
|
|
29
|
-
"ins",
|
|
30
|
-
"kbd",
|
|
31
|
-
"label",
|
|
32
|
-
"map",
|
|
33
|
-
"mark",
|
|
34
|
-
"noscript",
|
|
35
|
-
"object",
|
|
36
|
-
"output",
|
|
37
|
-
"picture",
|
|
38
|
-
"q",
|
|
39
|
-
"ruby",
|
|
40
|
-
"s",
|
|
41
|
-
"samp",
|
|
42
|
-
"small",
|
|
43
|
-
"span",
|
|
44
|
-
"strong",
|
|
45
|
-
"sub",
|
|
46
|
-
"sup",
|
|
47
|
-
"svg",
|
|
48
|
-
"time",
|
|
49
|
-
"u",
|
|
50
|
-
"var",
|
|
51
|
-
"video"
|
|
52
|
-
];
|
|
53
13
|
const nestjsTypeScriptRules = {
|
|
54
14
|
"ts/explicit-function-return-type": "off",
|
|
55
15
|
"ts/explicit-module-boundary-types": "off",
|
|
@@ -88,13 +48,9 @@ function getDefaultVueOptions(opts) {
|
|
|
88
48
|
};
|
|
89
49
|
if (opts?.ionic) overrides["vue/no-deprecated-slot-attribute"] = "off";
|
|
90
50
|
if (isMiniProgramEnabled(opts)) {
|
|
51
|
+
overrides["vue/no-deprecated-slot-attribute"] = "off";
|
|
91
52
|
overrides["vue/no-useless-template-attributes"] = "off";
|
|
92
|
-
overrides["vue/singleline-html-element-content-newline"] =
|
|
93
|
-
ignoreWhenNoAttributes: true,
|
|
94
|
-
ignoreWhenEmpty: true,
|
|
95
|
-
ignores: ["text", ...INLINE_ELEMENTS],
|
|
96
|
-
externalIgnores: []
|
|
97
|
-
}];
|
|
53
|
+
overrides["vue/singleline-html-element-content-newline"] = "off";
|
|
98
54
|
}
|
|
99
55
|
return { overrides };
|
|
100
56
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icebreakers/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.3",
|
|
5
5
|
"description": "ESLint preset from Icebreaker's dev-configs",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@antfu/eslint-config": "9.0.0",
|
|
54
|
-
"@eslint-react/eslint-plugin": "^5.8.
|
|
54
|
+
"@eslint-react/eslint-plugin": "^5.8.6",
|
|
55
55
|
"@typescript-eslint/rule-tester": "^8.60.0",
|
|
56
56
|
"@typescript-eslint/typescript-estree": "^8.60.0",
|
|
57
57
|
"@typescript-eslint/utils": "^8.60.0",
|
|
58
|
-
"@vue/compiler-sfc": "^3.5.
|
|
58
|
+
"@vue/compiler-sfc": "^3.5.35",
|
|
59
59
|
"eslint-flat-config-utils": "3.2.0",
|
|
60
60
|
"eslint-plugin-better-tailwindcss": "^4.5.0",
|
|
61
61
|
"eslint-plugin-format": "2.0.1",
|