Conversation
|
✅ Deploy Preview for ice-tw canceled.
|
File-Level Changes (文件级别更改)
Tips and commands (提示和命令)Interacting with Sourcery (与 Sourcery 交互)
Customizing Your Experience (自定义您的体验)Access your dashboard to: (访问您的 仪表板 以:)
Getting Help (获取帮助)
Original review guide in EnglishReviewer's GuideThis PR centralizes Prettier configuration at the monorepo root, installs and bumps Prettier-related plugins in the lockfile and package manifest, and integrates ESLint with Prettier by updating the root ESLint configuration. Flow diagram for formatting and linting workflow after centralizationflowchart TD
A[Developer runs `npm run format` or `prettier --write .`]
B[Prettier uses root .prettierrc.json and plugins]
C[Code is formatted according to unified rules]
D[ESLint runs with root config and eslint-config-prettier]
E[ESLint checks for code issues, ignores Prettier formatting conflicts]
F[Code is ready for commit]
A --> B --> C --> D --> E --> F
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
|
| "postcss-preset-env": "^10.2.3", | ||
| "postcss-scss": "^4.0.9", | ||
| "prettier": "^3.6.0", | ||
| "prettier-plugin-tailwindcss": "^0.6.13", |
There was a problem hiding this comment.
实际上我这里没有用到 prettier 和 prettier-plugin-tailwindcss 插件,因为我其实是用了 https://www.npmjs.com/package/eslint-plugin-tailwindcss 的
都集成在 @icebreakers/eslint-config 里面了
https://www.npmjs.com/package/@icebreakers/eslint-config?activeTab=dependencies
| 'ts/no-require-imports': 'warn', | ||
| }, | ||
| }, | ||
| { rules: { 'ts/no-require-imports': 'warn' } }, |
There was a problem hiding this comment.
这个命名实际上走的是 antfu 的规则命名,没有对他做什么修改
|
实际上 demo 下面这么多项目,都是各个框架的脚手架生成的,没有被纳入 pnpm workspace 进行管理,所以里面都是用的 yarn,然后默认那些文件都没管。 |



有太多代码不尊重 eslint 规则,格式化之后的代码和 eslint 存在冲突。monorepos 很多演示和package配置单独的 eslint 规则,这并不符合最佳实践。
此 PR 为 prettier 配置 workspace 即便的统一格式
后续作者步骤:
好的,这是翻译成中文的 pull request 总结:
Sourcery 总结
通过添加工作区级别的配置、集成关键插件、调整 ESLint 规则、更新格式化脚本以及更新 lockfile 中受影响的依赖项,统一并强制执行整个 monorepo 中一致的基于 Prettier 的格式化设置。
新特性:
.prettierrc.json和.prettierignore以集中管理格式化规则增强:
eslint-config-prettier并更新 ESLint 配置以遵循 Prettier 规则prettier --write构建:
oxc-parser和相关的绑定包升级到 0.74.0 并同步 lockfile 更改Original summary in English
Summary by Sourcery
Unify and enforce a consistent Prettier-based formatting setup across the monorepo by adding workspace-level config, integrating key plugins, aligning ESLint rules, updating format scripts, and bumping affected dependencies in the lockfile.
New Features:
Enhancements:
Build: