@yoyoboot/web-lint-config
v10.6.0
Published
共享 Web 语义检查预设与渐进质量门禁
Readme
@yoyoboot/web-lint-config
YoyoBoot 的公共 Web 语义检查预设,提供 ESLint flat config、Stylelint 17 config 与只减不增的历史债务门禁。Prettier 仍由消费者拥有格式偏好,项目架构规则留在项目本地配置。
使用
// eslint.config.mjs
import { webLintConfig } from '@yoyoboot/web-lint-config/eslint'
export default webLintConfig({ environment: 'browser' })// stylelint.config.mjs
import { styleLintConfig } from '@yoyoboot/web-lint-config/stylelint'
export default styleLintConfig({ tailwind: true })Stylelint 预设使用字符串形式的 postcss-html / postcss-less custom syntax,兼容声明的 Stylelint 17 peer 范围;Vue SFC 为兼容 <style lang="less"> 不把 Less function 与 // comment 当作 CSS 语义错误,其它样式 correctness 规则仍保持启用。
消费者通过 quality.config.mjs 显式声明 eslint/style/format glob,并使用 web-quality ci 执行渐进门禁。首次基线只能在仓库历史中不存在该文件时用 web-quality init 建立;后续只能运行 web-quality prune 删除已消失条目,禁止手工扩容、总数额度或通配符忽略。
源 manifest 始终保持 private: true 与 0.0.0-private。产品版本由 Unified Release Train staging 注入;本地 tarball 或 prepare-only 结果不代表 registry 已发布。
开发使用 Node 26.13.0、pnpm 12.16.1;消费者最低版本以 manifest 的 engines/peers 为准。语义工具使用 TypeScript 6 API:typescript 安装为 npm:@typescript/[email protected],不能指向只提供原生编译器的 TypeScript 7。独立 tarball 检查覆盖 ESLint 10.0 / Stylelint 17.0 / TS 5.9.3,以及当前稳定工具与 TS 6 API,合法 JS/TS/Vue/CSS/Less 通过,未定义标识符、未使用变量和无效样式失败。
