my-code-style 1.8.4 → 1.8.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## 变更日志
2
2
 
3
+ ## [1.8.5](https://github.com/myvn/codeStyle/compare/v1.8.4...v1.8.5) (2026-09-22)
4
+
5
+ ### 🐛 Bug Fixes | Bug 修复
6
+
7
+ - **stylelint:** Less 线关闭 declaration-property-value-no-unknown,修复 rpx 误报 ([ba7dda0](https://github.com/myvn/codeStyle/commit/ba7dda0d99988f1cab4b1d7ff1f73707c611a4f2))
8
+
3
9
  ## [1.8.4](https://github.com/myvn/codeStyle/compare/v1.8.3...v1.8.4) (2026-09-22)
4
10
 
5
11
  ### 🐛 Bug Fixes | Bug 修复
package/README.md CHANGED
@@ -240,12 +240,12 @@ npx my-code-style-init [--dry-run] [--backup] [--version|-v] [--help|-h]
240
240
  ## 测试套件
241
241
 
242
242
  ```bash
243
- npm run test:all # 全量运行 182 项:用例明细 + 分类统计 + 最慢文件定位
243
+ npm run test:all # 全量运行 184 项:用例明细 + 分类统计 + 最慢文件定位
244
244
  npm run diagnose # 换机器后先跑它:进程 / git / 文件系统 / hooks 各占多少
245
245
  npm run sweep # 给本机找最佳文件级并发(扫 integration 套件)
246
246
  npm test # 只跑基础 CLI 与配置矩阵(86 项)
247
247
  npm run test:integration:setup # 安装现代化隔离依赖运行环境
248
- npm run test:integration # Flat Config、真实 Husky 及提交链路测试(61 项)
248
+ npm run test:integration # Flat Config、真实 Husky 及提交链路测试(63 项)
249
249
  npm run test:legacy:setup # 安装 ESLint 8 隔离运行环境
250
250
  npm run test:legacy # ESLint 8.57.0 兼容性回归测试(27 项)
251
251
  npm run test:stylelint17:setup # 安装 Stylelint 17 隔离运行环境
@@ -267,11 +267,11 @@ npm run test:stylelint17 # Stylelint 17 生态兼容性回归(8 项)
267
267
  …
268
268
  ✓ 通过 86 · 3.6s · 最慢文件 init-matrix.test.cjs 3.2s
269
269
 
270
- ▶ [2/4] 现代工具链与提交链 (共 61 项,24 文件 · 3 文件并发(自动:2 核 / 内存 4G))
270
+ ▶ [2/4] 现代工具链与提交链 (共 63 项,24 文件 · 3 文件并发(自动:2 核 / 内存 4G))
271
271
  ✓ 完整提交链:JS/TS/Vue/nvue/CSS/less 自动修复及二次复检 · 10.4s
272
272
  ✓ 发布防呆:HEAD 已有 v* tag 时拦截(此时 release 工具会静默抬版并写出空 CHANGELOG) · 609ms
273
273
  …
274
- ✓ 通过 61 · 41.4s · 最慢文件 commit-chain-less.test.cjs 11.4s
274
+ ✓ 通过 63 · 40.2s · 最慢文件 commit-chain-both.test.cjs 10.7s
275
275
 
276
276
  ▶ [3/4] ESLint 8 兼容性 (共 27 项,1 文件 · 3 文件并发(自动:2 核 / 内存 4G))
277
277
  ✓ 独立运行 ESLint 8 支持下限而非 ESLint 9 · 1ms
@@ -289,16 +289,16 @@ npm run test:stylelint17 # Stylelint 17 生态兼容性回归(8 项)
289
289
  套件 通过 失败 跳过 用时
290
290
  ──────────────────────────────────────────────────────
291
291
  基础 CLI 与配置矩阵 86 0 - 3.6s
292
- 现代工具链与提交链 61 0 - 41.4s
292
+ 现代工具链与提交链 63 0 - 40.2s
293
293
  ESLint 8 兼容性 27 0 - 18.7s
294
294
  Stylelint 17 兼容性 8 0 - 7.3s
295
295
  ──────────────────────────────────────────────────────
296
- 合计 182 0 - 70.0s
296
+ 合计 184 0 - 69.1s
297
297
  ──────────────────────────────────────────────────────
298
298
 
299
299
  ⏱ 最慢文件:eslint8.test.cjs 18.0s · commit-chain-less.test.cjs 11.4s · commit-chain-both.test.cjs 11.3s
300
300
 
301
- ✅ 全部通过:182/182 项,用时 70.0s
301
+ ✅ 全部通过:184/184 项,用时 69.1s
302
302
  ```
303
303
 
304
304
  终端里每个套件下方还有一条实时进度条(`██████░░░░ 38/66 失败 0 4.0s`)。附加参数:
@@ -376,7 +376,7 @@ npm run test:all -- --profile # 看每个测试文件耗时,定位瓶颈
376
376
  | `npm run test:integration`(运行器调度,自动并发 3) | 30.6s(只看集成套件那一段) |
377
377
  | 串行套件 + 文件级并发 23(全部一波) | ✗ 3.8G 内存沙箱被 OOM 压垮(19 项 SIGKILL) |
378
378
 
379
- 同机复测(182 项,同一台 2 核沙箱连续跑;绝对秒数随机器负载波动,相对关系稳定):串行套件 + 文件级并发 1 = 72.3s、默认自动并发 3 = 70.0s、`--parallel` 四套件 = 64.0s、`npm run test:integration` = 43.3s、`node --test demo-test/integration/*.test.cjs` = 62.4s。
379
+ 同机复测(184 项,同一台 2 核沙箱连续跑;绝对秒数随机器负载波动,相对关系稳定):串行套件 + 文件级并发 1 = 72.3s、默认自动并发 3 = 69.1s、`--parallel` 四套件 = 64.0s、`npm run test:integration` = 43.3s、`node --test demo-test/integration/*.test.cjs` = 62.4s(部分为 182 项时实测,本轮仅集成套件 +2 用例,差值在秒级)。
380
380
 
381
381
  (2 核沙箱里并行收益被 CPU 争抢吃掉大半,`--concurrency=1` 时单个文件只要 0.7–4.2s;
382
382
  16 核机器上集成套件那段 ≈ 最慢子文件,即"一次真实提交"的量级。)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "my-code-style",
3
- "version": "1.8.4",
3
+ "version": "1.8.5",
4
4
  "description": "Lint/Format/Git 配置工程化 npm 包(ESLint + Prettier + Stylelint + Commitlint + Husky + standard-version)",
5
5
  "type": "commonjs",
6
6
  "main": "src/eslint/uniapp.cjs",
@@ -44,6 +44,11 @@ module.exports = {
44
44
  "function-no-unknown": null,
45
45
  // 允许小程序单位 rpx
46
46
  "unit-no-unknown": [true, { ignoreUnits: ["rpx"] }],
47
+ // 关闭属性-值匹配校验:stylelint-config-recommended 默认开启它,会把
48
+ // `width: 750rpx` 报成 unknown value( Less 线没有 scss 配置包那层关闭,
49
+ // BUG-029 深测实测);SCSS 线上游(recommended-scss)本就将其置 null,
50
+ // 这里对齐,保证 uni-app Less 项目 rpx 写法不误报。
51
+ "declaration-property-value-no-unknown": null,
47
52
  // 允许小程序 page 标签
48
53
  "selector-type-no-unknown": [true, { ignoreTypes: ["page"] }],
49
54
  "comment-empty-line-before": "never",