@xiaohe01/stylelint-config 2.3.0 → 2.3.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
@@ -165,7 +165,8 @@ function html(options = {}) {
165
165
 
166
166
  function scss(options = {}) {
167
167
  const {
168
- vue = false
168
+ vue = false,
169
+ uniapp = false
169
170
  } = options;
170
171
  return [
171
172
  {
@@ -204,6 +205,9 @@ function scss(options = {}) {
204
205
  "scss/operator-no-newline-after": true,
205
206
  "scss/operator-no-newline-before": true,
206
207
  "scss/operator-no-unspaced": true,
208
+ ...uniapp ? {
209
+ "scss/load-partial-extension": "always"
210
+ } : {},
207
211
  ...options.overrides
208
212
  }
209
213
  }
@@ -272,6 +276,9 @@ const VUE_PACKAGES = [
272
276
  "vitepress",
273
277
  "@slidev/cli"
274
278
  ];
279
+ const UNIAPP_PACKAGES = [
280
+ "@dcloudio/uni-app"
281
+ ];
275
282
 
276
283
  function castArray(value) {
277
284
  return Array.isArray(value) ? value : [value];
@@ -284,7 +291,8 @@ function defineConfig(options = {}, ...userOverrides) {
284
291
  const {
285
292
  scss: enableScss = isPkgExists(SCSS_PACKAGES),
286
293
  html: enableHtml = true,
287
- vue: enableVue = isPkgExists(VUE_PACKAGES)
294
+ vue: enableVue = isPkgExists(VUE_PACKAGES),
295
+ uniapp: enableUniApp = isPkgExists(UNIAPP_PACKAGES)
288
296
  } = options;
289
297
  const overrides = [
290
298
  ...setup({
@@ -304,7 +312,8 @@ function defineConfig(options = {}, ...userOverrides) {
304
312
  overrides.push(
305
313
  ...scss({
306
314
  overrides: getOverrides(options.scss),
307
- vue: !!enableVue
315
+ vue: !!enableVue,
316
+ uniapp: enableUniApp
308
317
  })
309
318
  );
310
319
  }
package/dist/index.d.cts CHANGED
@@ -35,6 +35,12 @@ interface OptionsConfig {
35
35
  * @default auto-detect based on the dependencies
36
36
  */
37
37
  vue?: boolean | OptionsOverrides;
38
+ /**
39
+ * Enable uniapp support.
40
+ *
41
+ * @default auto-detect based on the dependencies
42
+ */
43
+ uniapp?: boolean;
38
44
  }
39
45
 
40
46
  declare function defineConfig(options?: OptionsConfig & Omit<Config, "overrides">, ...userOverrides: ConfigOverride[]): Config;
package/dist/index.d.mts CHANGED
@@ -35,6 +35,12 @@ interface OptionsConfig {
35
35
  * @default auto-detect based on the dependencies
36
36
  */
37
37
  vue?: boolean | OptionsOverrides;
38
+ /**
39
+ * Enable uniapp support.
40
+ *
41
+ * @default auto-detect based on the dependencies
42
+ */
43
+ uniapp?: boolean;
38
44
  }
39
45
 
40
46
  declare function defineConfig(options?: OptionsConfig & Omit<Config, "overrides">, ...userOverrides: ConfigOverride[]): Config;
package/dist/index.d.ts CHANGED
@@ -35,6 +35,12 @@ interface OptionsConfig {
35
35
  * @default auto-detect based on the dependencies
36
36
  */
37
37
  vue?: boolean | OptionsOverrides;
38
+ /**
39
+ * Enable uniapp support.
40
+ *
41
+ * @default auto-detect based on the dependencies
42
+ */
43
+ uniapp?: boolean;
38
44
  }
39
45
 
40
46
  declare function defineConfig(options?: OptionsConfig & Omit<Config, "overrides">, ...userOverrides: ConfigOverride[]): Config;
package/dist/index.mjs CHANGED
@@ -163,7 +163,8 @@ function html(options = {}) {
163
163
 
164
164
  function scss(options = {}) {
165
165
  const {
166
- vue = false
166
+ vue = false,
167
+ uniapp = false
167
168
  } = options;
168
169
  return [
169
170
  {
@@ -202,6 +203,9 @@ function scss(options = {}) {
202
203
  "scss/operator-no-newline-after": true,
203
204
  "scss/operator-no-newline-before": true,
204
205
  "scss/operator-no-unspaced": true,
206
+ ...uniapp ? {
207
+ "scss/load-partial-extension": "always"
208
+ } : {},
205
209
  ...options.overrides
206
210
  }
207
211
  }
@@ -270,6 +274,9 @@ const VUE_PACKAGES = [
270
274
  "vitepress",
271
275
  "@slidev/cli"
272
276
  ];
277
+ const UNIAPP_PACKAGES = [
278
+ "@dcloudio/uni-app"
279
+ ];
273
280
 
274
281
  function castArray(value) {
275
282
  return Array.isArray(value) ? value : [value];
@@ -282,7 +289,8 @@ function defineConfig(options = {}, ...userOverrides) {
282
289
  const {
283
290
  scss: enableScss = isPkgExists(SCSS_PACKAGES),
284
291
  html: enableHtml = true,
285
- vue: enableVue = isPkgExists(VUE_PACKAGES)
292
+ vue: enableVue = isPkgExists(VUE_PACKAGES),
293
+ uniapp: enableUniApp = isPkgExists(UNIAPP_PACKAGES)
286
294
  } = options;
287
295
  const overrides = [
288
296
  ...setup({
@@ -302,7 +310,8 @@ function defineConfig(options = {}, ...userOverrides) {
302
310
  overrides.push(
303
311
  ...scss({
304
312
  overrides: getOverrides(options.scss),
305
- vue: !!enableVue
313
+ vue: !!enableVue,
314
+ uniapp: enableUniApp
306
315
  })
307
316
  );
308
317
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xiaohe01/stylelint-config",
3
3
  "type": "module",
4
- "version": "2.3.0",
4
+ "version": "2.3.2",
5
5
  "description": "🤚 Stylelint config preset for xiaohe",
6
6
  "author": "xiaohe0601 <xiaohe0601@outlook.com>",
7
7
  "license": "MIT",
@@ -45,11 +45,11 @@
45
45
  "postcss-html": "^1.8.0",
46
46
  "postcss-scss": "^4.0.9",
47
47
  "stylelint-config-recess-order": "^6.0.0",
48
- "stylelint-order": "^6.0.4",
49
- "stylelint-scss": "^6.11.1"
48
+ "stylelint-order": "^7.0.0",
49
+ "stylelint-scss": "^6.12.0"
50
50
  },
51
51
  "devDependencies": {
52
- "stylelint": "^16.16.0"
52
+ "stylelint": "^16.19.1"
53
53
  },
54
54
  "scripts": {
55
55
  "build": "unbuild"