Bri*_*nis 5 javascript node-modules eslint package.json monorepo
我有一些服务以这种方式组织成单一存储库:
\n\nrepo_root/\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 services/\n\xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 service_one/\n\xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 service_two/\n\xe2\x94\x82 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 service_three/\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 package.json\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 node_modules\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 .eslintrc\n
此外,每个单独的服务都有自己的package.json和node_modules。我想使用存储在的 eslint 配置repo_root目录中的 eslint 配置来检查各个服务。我的问题是,当我尝试运行类似的东西时
eslint services/service_one
例如,它无法找到 eslint目录.eslintrc中安装的eslint 插件模块。node_modulesrepo_root
我想避免在每个服务中多余地需要这些插件模块。无论如何,是否可以配置 eslint 来智能地查找模块,即使它们位于服务本身的父目录中?
\n