我在具有以下项目结构的高级文本3中工作:
workdir
--root-project-dirictory
---- src
---- eslint.yml
--project.sublime-project
问题是这样的:ESLint在eslint-plugin-react
中而不是在workdir
中寻找root-project-dirictory
插件。
结果是我得到一个错误:
ESLint couldn't find the plugin "eslint-plugin-react".
(The package "eslint-plugin-react" was not found when loaded as a Node module from the directory "/.../workdir".)
...
The plugin "eslint-plugin-react" was referenced from the config file in "root-project-dirictory / .eslintrc.yml".
直到现在,如果不更改工作目录的结构,我还没有找到解决此问题的方法。
作为解决方案,我使用以下方法:
创建一个空的sublime-text项目
向项目中一个接一个地添加文件夹,例如“ src”,“ app” ...
如果--root-project-dirictory需要文件,则将其添加,但是我正在该项目的单独sublime-text文件夹中处理该应用程序