We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
下面的 typings.d.ts 是 umi 默认生成的, eslint 报错
master-micro 这个项目如果单独提取出来,配置是没有问题的,但如果放在 monorepo 仓库下面,配置就失效了
https://github.com/GreatAuk/-umijs-fabric-bug 这个是复现仓库
The text was updated successfully, but these errors were encountered:
其实没看懂你问题,配图说明你 eslint 能运行啊。
拉了仓库,直接 yarn ,eslint 配置是失效的。
yarn
今天弄 monorepo 也是发现这个问题,就来 issues 看看。
fabric/src/eslint.ts
Line 29 in d499e53
Line 19 in d499e53
因为 eslint 配置对于项目是否是 TypeScript 项目的判定,是看 fabric 这个包当前 Node.js 进程执行时的工作目录下是否有 tsconfig.json。monorepo 项目下它是直接去寻找根目录的 tsconfig.json ,并且指定 eslint 的解析设置来源于根目录的 tsconfig.json
eslint
TypeScript
fabric
Node.js
tsconfig.json
有点不合理 🤔
让我解决的话, eslint 配置改成传参 __dirname 函数导出?tsconfig.json 也根据 __dirname 来定位。
__dirname
@chenshuai2144 希望解惑
Sorry, something went wrong.
monorepo 应该所有的包共用一个 lint吧,所以我只找了根目录下面的
不同的packages去扩展一个公共的规则,这样好些?比如packages里有各自不同的全局变量
No branches or pull requests
下面的 typings.d.ts 是 umi 默认生成的, eslint 报错
master-micro 这个项目如果单独提取出来,配置是没有问题的,但如果放在 monorepo 仓库下面,配置就失效了
https://github.com/GreatAuk/-umijs-fabric-bug 这个是复现仓库
The text was updated successfully, but these errors were encountered: