@icebreakers/eslint-config 0.7.1 → 0.7.2

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 CHANGED
@@ -8941,6 +8941,50 @@ var defuArrayFn = createDefu((object, key, currentValue) => {
8941
8941
 
8942
8942
  // src/defaults.ts
8943
8943
  init_cjs_shims();
8944
+
8945
+ // ../../node_modules/.pnpm/eslint-plugin-vue@9.31.0_eslint@9.14.0_jiti@2.4.0_/node_modules/eslint-plugin-vue/lib/utils/inline-non-void-elements.json
8946
+ var inline_non_void_elements_default = [
8947
+ "a",
8948
+ "abbr",
8949
+ "audio",
8950
+ "b",
8951
+ "bdi",
8952
+ "bdo",
8953
+ "canvas",
8954
+ "cite",
8955
+ "code",
8956
+ "data",
8957
+ "del",
8958
+ "dfn",
8959
+ "em",
8960
+ "i",
8961
+ "iframe",
8962
+ "ins",
8963
+ "kbd",
8964
+ "label",
8965
+ "map",
8966
+ "mark",
8967
+ "noscript",
8968
+ "object",
8969
+ "output",
8970
+ "picture",
8971
+ "q",
8972
+ "ruby",
8973
+ "s",
8974
+ "samp",
8975
+ "small",
8976
+ "span",
8977
+ "strong",
8978
+ "sub",
8979
+ "sup",
8980
+ "svg",
8981
+ "time",
8982
+ "u",
8983
+ "var",
8984
+ "video"
8985
+ ];
8986
+
8987
+ // src/defaults.ts
8944
8988
  function getDefaultVueOptions(opts) {
8945
8989
  const overrides2 = {
8946
8990
  "vue/attribute-hyphenation": "off",
@@ -8964,6 +9008,21 @@ function getDefaultVueOptions(opts) {
8964
9008
  if (opts?.ionic) {
8965
9009
  overrides2["vue/no-deprecated-slot-attribute"] = "off";
8966
9010
  }
9011
+ if (opts?.weapp) {
9012
+ overrides2["vue/singleline-html-element-content-newline"] = [
9013
+ "error",
9014
+ {
9015
+ ignoreWhenNoAttributes: true,
9016
+ ignoreWhenEmpty: true,
9017
+ ignores: [
9018
+ // 小程序标签
9019
+ "text",
9020
+ ...inline_non_void_elements_default
9021
+ ],
9022
+ externalIgnores: []
9023
+ }
9024
+ ];
9025
+ }
8967
9026
  const vueOptions = {
8968
9027
  overrides: overrides2
8969
9028
  };
package/dist/index.d.cts CHANGED
@@ -8,6 +8,7 @@ type UserDefinedOptions = OptionsConfig & TypedFlatConfigItem & {
8
8
  a11y?: boolean;
9
9
  nest?: boolean;
10
10
  ionic?: boolean;
11
+ weapp?: boolean;
11
12
  };
12
13
  type UserConfigItem = Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[] | FlatConfigComposer<any, any> | Linter.Config[]>;
13
14
 
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ type UserDefinedOptions = OptionsConfig & TypedFlatConfigItem & {
8
8
  a11y?: boolean;
9
9
  nest?: boolean;
10
10
  ionic?: boolean;
11
+ weapp?: boolean;
11
12
  };
12
13
  type UserConfigItem = Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[] | FlatConfigComposer<any, any> | Linter.Config[]>;
13
14
 
package/dist/index.js CHANGED
@@ -89,6 +89,50 @@ var defuArrayFn = createDefu((object, key, currentValue) => {
89
89
 
90
90
  // src/defaults.ts
91
91
  init_esm_shims();
92
+
93
+ // ../../node_modules/.pnpm/eslint-plugin-vue@9.31.0_eslint@9.14.0_jiti@2.4.0_/node_modules/eslint-plugin-vue/lib/utils/inline-non-void-elements.json
94
+ var inline_non_void_elements_default = [
95
+ "a",
96
+ "abbr",
97
+ "audio",
98
+ "b",
99
+ "bdi",
100
+ "bdo",
101
+ "canvas",
102
+ "cite",
103
+ "code",
104
+ "data",
105
+ "del",
106
+ "dfn",
107
+ "em",
108
+ "i",
109
+ "iframe",
110
+ "ins",
111
+ "kbd",
112
+ "label",
113
+ "map",
114
+ "mark",
115
+ "noscript",
116
+ "object",
117
+ "output",
118
+ "picture",
119
+ "q",
120
+ "ruby",
121
+ "s",
122
+ "samp",
123
+ "small",
124
+ "span",
125
+ "strong",
126
+ "sub",
127
+ "sup",
128
+ "svg",
129
+ "time",
130
+ "u",
131
+ "var",
132
+ "video"
133
+ ];
134
+
135
+ // src/defaults.ts
92
136
  function getDefaultVueOptions(opts) {
93
137
  const overrides = {
94
138
  "vue/attribute-hyphenation": "off",
@@ -112,6 +156,21 @@ function getDefaultVueOptions(opts) {
112
156
  if (opts?.ionic) {
113
157
  overrides["vue/no-deprecated-slot-attribute"] = "off";
114
158
  }
159
+ if (opts?.weapp) {
160
+ overrides["vue/singleline-html-element-content-newline"] = [
161
+ "error",
162
+ {
163
+ ignoreWhenNoAttributes: true,
164
+ ignoreWhenEmpty: true,
165
+ ignores: [
166
+ // 小程序标签
167
+ "text",
168
+ ...inline_non_void_elements_default
169
+ ],
170
+ externalIgnores: []
171
+ }
172
+ ];
173
+ }
115
174
  const vueOptions = {
116
175
  overrides
117
176
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@icebreakers/eslint-config",
3
3
  "type": "module",
4
- "version": "0.7.1",
4
+ "version": "0.7.2",
5
5
  "description": "icebreakers's eslint config",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -40,7 +40,7 @@
40
40
  "dist"
41
41
  ],
42
42
  "dependencies": {
43
- "@antfu/eslint-config": "3.8.0",
43
+ "@antfu/eslint-config": "3.9.1",
44
44
  "@eslint-react/eslint-plugin": "^1.16.1",
45
45
  "eslint-plugin-format": "0.1.2",
46
46
  "eslint-plugin-jsx-a11y": "^6.10.2",