@icebreakers/stylelint-config 6.0.0 → 6.0.1

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 CHANGED
@@ -11,7 +11,7 @@
11
11
  - Node.js `^22.23.4 || ^24.22.1 || >=26.12.1` (24.22.1 LTS recommended)
12
12
  - Stylelint 18 (flat-compatible configuration)
13
13
 
14
- The default SCSS, Vue and ordering presets are tested with Stylelint 18. The SCSS and recess-order upstream packages still declare Stylelint 17 peer ranges, so package managers can report peer warnings; strict peer installation is not supported until those packages publish compatible metadata. No peer overrides are applied. Custom `stylelint-scss` rules outside this preset may require their own Stylelint 18 migration.
14
+ The default SCSS, Vue and ordering presets support Stylelint 18 with strict peer installation. The upstream SCSS implementation and presets whose peer ranges have not caught up are bundled at build time, with their rules and licenses preserved. Consumers need no peer overrides. Isolated tarball tests verify CSS, SCSS, Vue, WXSS, property-order fixes and the ESLint style bridge. A separately installed `stylelint-scss` package still follows its own compatibility range.
15
15
 
16
16
  ## Installation
17
17
 
package/README.zh.md CHANGED
@@ -9,7 +9,7 @@
9
9
  - Node.js `^22.23.4 || ^24.22.1 || >=26.12.1`(推荐 24.22.1 LTS)
10
10
  - Stylelint 18(支持 Flat Config)
11
11
 
12
- 默认 SCSS、Vue 和排序预设已通过 Stylelint 18 验证。SCSS 与 recess-order 上游包仍声明 Stylelint 17 的 peer 范围,包管理器可能报告 peer 警告;在上游发布兼容声明前,不支持严格 peer 安装。本包不使用 peer override。预设外自行启用的 `stylelint-scss` 规则仍需独立验证其 Stylelint 18 兼容性。
12
+ 默认 SCSS、Vue 和排序预设支持 Stylelint 18 和严格 peer 安装。尚未更新 peer 范围的上游 SCSS 插件与预设在构建时打包,运行时使用本包预设,无需消费端 peer override。保留完整规则和上游许可证,使用隔离 tarball 消费者验证 CSS、SCSS、Vue、WXSS、属性排序修复及 ESLint 样式桥接。预设外自行安装的 `stylelint-scss` 仍遵循其自身的兼容范围。
13
13
 
14
14
  ## 安装
15
15
 
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
- import process from "node:process";
2
1
  import fs from "node:fs";
3
2
  import { resolve } from "node:path";
3
+ import process from "node:process";
4
4
  import jsonc from "comment-json";
5
5
  // src/shared.ts
6
6
  const STYLELINT_LANGUAGES = [
package/dist/index.js CHANGED
@@ -1,10 +1,5 @@
1
- import { createRequire } from "node:module";
2
- import process from "node:process";
3
1
  import { fileURLToPath } from "node:url";
4
2
  import { base, noApplyRuleName, noArbitraryValueRuleName, noAtomicClassRuleName, noCssLayerRuleName, noInvalidApplyRuleName, noInvalidThemeFunctionRuleName, noScreenDirectiveRuleName, noThemeFunctionRuleName, recommended, strict, unocssNoApplyRuleName, unocssNoArbitraryValueRuleName, unocssNoAtomicClassRuleName, unocssNoInvalidApplyRuleName, unocssNoVariantGroupRuleName } from "stylelint-plugin-tailwindcss";
5
- // src/constants.ts
6
- const PRESET_VUE_SCSS = "stylelint-config-recommended-vue/scss";
7
- const PRESET_RECESS_ORDER = "stylelint-config-recess-order";
8
3
  // src/utils.ts
9
4
  const IGNORE_DEFAULTS = {
10
5
  atRules: [
@@ -63,22 +58,10 @@ function normalizeExtends(base) {
63
58
  return base;
64
59
  }
65
60
  // src/config.ts
66
- const requireFromConfig = createRequire(import.meta.url);
67
61
  const BEM_OOCSS_CLASS_NAME_PATTERN = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*(?:__[a-z0-9]+(?:-[a-z0-9]+)*)*(?:--[a-z0-9]+(?:-[a-z0-9]+)*)*$/;
68
- function resolvePresetPath(specifier) {
69
- if (!(process.env["ICEBREAKER_STYLELINT_DISABLE_IMPORT_META_RESOLVE"] === "1") && typeof import.meta.resolve === "function") try {
70
- const resolved = import.meta.resolve(specifier);
71
- return fileURLToPath(resolved);
72
- } catch {}
73
- try {
74
- return requireFromConfig.resolve(specifier);
75
- } catch {
76
- return specifier;
77
- }
78
- }
79
62
  const PRESET_PATH_STANDARD_SCSS = fileURLToPath(new URL("../presets/stylelint-config-standard-scss.mjs", import.meta.url));
80
- const PRESET_PATH_VUE_SCSS = resolvePresetPath(PRESET_VUE_SCSS);
81
- const PRESET_PATH_RECESS_ORDER = resolvePresetPath(PRESET_RECESS_ORDER);
63
+ const PRESET_PATH_VUE_SCSS = fileURLToPath(new URL("../presets/stylelint-config-recommended-vue.mjs", import.meta.url));
64
+ const PRESET_PATH_RECESS_ORDER = fileURLToPath(new URL("../presets/stylelint-config-recess-order.mjs", import.meta.url));
82
65
  const MINI_PROGRAM_IGNORE_FILES = [
83
66
  "dist/**",
84
67
  ".weapp-vite/**",
@@ -134,7 +117,7 @@ function resolveRules(options) {
134
117
  "unit-no-unknown": [true, { ignoreUnits }],
135
118
  "selector-type-no-unknown": [true, { ignoreTypes }],
136
119
  "at-rule-no-deprecated": [true, { ignoreAtRules }],
137
- "at-rule-no-unknown": [true, { ignoreAtRules }],
120
+ "at-rule-no-unknown": options?.presets?.scss === false ? [true, { ignoreAtRules }] : null,
138
121
  "scss/selector-no-redundant-nesting-selector": true,
139
122
  "scss/at-rule-no-unknown": [true, { ignoreAtRules }]
140
123
  };
@@ -0,0 +1,3 @@
1
+ import { Config } from "stylelint";
2
+ declare const config: Config;
3
+ export { config as default };