chore: init read-star monorepo

This commit is contained in:
2026-01-16 13:06:44 +08:00
commit 1e510efe8e
508 changed files with 44803 additions and 0 deletions

View File

@ -0,0 +1,55 @@
import { antfu } from '@antfu/eslint-config'
export function readStarConfig(options = {}, ...userConfigs) {
return antfu(
{
vue: true,
typescript: true,
unocss: true,
formatters: {
css: true,
html: true,
markdown: 'prettier',
},
...options,
},
// --- 针对 Soybean 模版遗留问题的补丁 ---
{
rules: {
// 强制块顺序script -> template -> style
'vue/block-order': [
'error',
{
order: ['script', 'template', 'style'],
},
],
// 1. 解决 vite-env.d.ts 中的旧版规则报错
// 告诉 ESLint如果遇到旧的 @typescript-eslint 前缀,不要报错
'@typescript-eslint/no-shadow': 'off',
'ts/no-shadow': 'error',
// 2. 将正则校验中的硬性错误降级为警告
// 这样可以跑通 lint同时在编辑器里给你提示
'regexp/no-useless-quantifier': 'warn',
'regexp/no-super-linear-backtracking': 'warn',
'regexp/no-unused-capturing-group': 'warn',
// 3. 忽略 JSDoc 校验Soybean 模版中参数注释不规范)
'jsdoc/check-param-names': 'off',
// 4. 其他 Soybean 自动生成代码的兼容
'eslint-comments/no-unlimited-disable': 'off',
},
},
// --- 排除掉不需要校验的自动生成目录 ---
{
ignores: [
'**/router/elegant/**',
'**/typings/elegant-router.d.ts',
],
},
...userConfigs,
)
}
export default readStarConfig