繁体   English   中英

git 子模块上的 Eslint,如何覆盖父配置

[英]Eslint on git submodule, how to overwrite parent config

我想在里面和父亲上使用 eslint,我的目标是在我的核心上使用管道,因为有很多人在上面,但是它正在获取父项目的配置,我该如何避免呢?

> core@0.1.0 lint
> eslint ./src/**/*.{js,jsx} --fix


- client\core\node_modules\eslint-plugin-react\index.js (loaded in ".eslintrc.js")
- client\node_modules\eslint-plugin-react\index.js (loaded in "..\.eslintrc.js")

Please remove the "plugins" setting from either config or remove either plugin installation.

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.```

要解决这个问题,只需在当前目录和父目录上的 eslint 配置上使用 root: true

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM