ESLint找不到插件“ eslint-plugin-react”]

问题描述 投票:1回答:1

我在具有以下项目结构的高级文本3中工作:

workdir

--root-project-dirictory

---- src

---- eslint.yml

--project.sublime-project

问题是这样的:ESLinteslint-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".
sublimetext eslint
1个回答
0
投票

直到现在,如果不更改工作目录的结构,我还没有找到解决此问题的方法。

作为解决方案,我使用以下方法:

  • 创建一个空的sublime-text项目

  • 向项目中一个接一个地添加文件夹,例如“ src”,“ app” ...

  • 如果--root-project-dirictory需要文件,则将其添加,但是我正在该项目的单独sublime-text文件夹中处理该应用程序

© www.soinside.com 2019 - 2024. All rights reserved.