@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 +1 -1
- package/README.zh.md +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +3 -20
- package/dist/presets/order.d.ts +3 -0
- package/dist/presets/order.js +841 -0
- package/dist/presets/scss.d.ts +3 -0
- package/dist/presets/scss.js +15913 -0
- package/dist/presets/vue.d.ts +3 -0
- package/dist/presets/vue.js +1421 -0
- package/dist/rolldown-runtime-DegdyBIC.js +25 -0
- package/package.json +8 -4
- package/presets/LICENSE.stylelint-config-recess-order +15 -0
- package/presets/LICENSE.stylelint-config-recommended-scss +21 -0
- package/presets/LICENSE.stylelint-config-recommended-vue +21 -0
- package/presets/LICENSE.stylelint-scss +21 -0
- package/presets/THIRD_PARTY_NOTICES.md +356 -0
- package/presets/stylelint-config-recess-order.mjs +1 -0
- package/presets/stylelint-config-recommended-scss.mjs +1 -0
- package/presets/stylelint-config-recommended-vue.mjs +1 -0
- package/presets/stylelint-config-standard-scss.mjs +1 -1
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
|
|
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
|
|
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
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 =
|
|
81
|
-
const PRESET_PATH_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
|
};
|