eslint-plugin-prettier无法被VS Code全局识别

时间:2019-01-29 03:51:43

标签: node.js npm visual-studio-code vscode-settings prettier

我已全局安装软件包eslint-plugin-prettier

npm list --depth=0 -g结果:

/usr/local/lib
├── babel-eslint@10.0.1
├── eslint@5.12.1
├── eslint-config-react-redux@1.0.6
├── eslint-plugin-prettier@3.0.1
├── npm@6.5.0
└── prettier@1.16.1

但是,在我的projetc中,eslint文件未加载,并向我返回以下错误:

[Error - 12:42:27 AM] Cannot find module 'eslint-plugin-prettier' Referenced from: /my/workspace/directory/.eslintrc.json Referenced from: my/workspace/directory/my/project/directory/package.json

解决方案?

0 个答案:

没有答案