在 setting.json [vscode] 中设置 linter 的路径
Set path for linter in setting.json [vscode]
我在 .vscode 文件夹中有以下 setting.json 文件,
{
"cSpell.ignoreWords": [
"pformat"
]
}
我的 eslint 插件出现问题,在 vscode、
中出现以下错误
[Info - 13:14:45] Failed to load plugin 'react-hooks' declared in 'projectmt'/.eslintrc.json': Cannot find module 'eslint-plugin-react-hooks'
要解决此问题,我需要添加一些内容来指定项目中 linting 文件的路径,我被告知但未显示如何执行此操作。
所以我设法自己解决了这个问题,
您需要在 settings.json 中指定 eslint.json 文件所在的位置。密码是
"eslint.workingDirectories": [
"./projectmt/"
]
这让我的 linter 再次在 vscode 中工作,希望这对以后的人有所帮助。
我在 .vscode 文件夹中有以下 setting.json 文件,
{
"cSpell.ignoreWords": [
"pformat"
]
}
我的 eslint 插件出现问题,在 vscode、
中出现以下错误[Info - 13:14:45] Failed to load plugin 'react-hooks' declared in 'projectmt'/.eslintrc.json': Cannot find module 'eslint-plugin-react-hooks'
要解决此问题,我需要添加一些内容来指定项目中 linting 文件的路径,我被告知但未显示如何执行此操作。
所以我设法自己解决了这个问题,
您需要在 settings.json 中指定 eslint.json 文件所在的位置。密码是
"eslint.workingDirectories": [
"./projectmt/"
]
这让我的 linter 再次在 vscode 中工作,希望这对以后的人有所帮助。