我希望Prettier使用VSCode中的eslint规则自动格式化我的代码,但它显示此错误:
无法加载在'CLIOptions'中声明的插件'import':找不到模块'eslint-plugin-import' 需要堆栈: -C:\ Dev \ Tool \ Microsoft VS Code__placeholder __。js
package.json中的依赖项:
"devDependencies": {
"eslint": "^6.4.0",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-plugin-import": "^2.18.2"
}
.eslint.js:
module.exports = {
"env": {
"commonjs": true,
"es6": true,
"node": true
},
"extends": "airbnb-base",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
}
};