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

时间:2021-04-16 15:25:51

标签: javascript reactjs git eslint

我想在它内部和父亲身上使用 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.```

1 个答案:

答案 0 :(得分:0)

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

相关问题