Hello, i'm using vscode and already setup a small project with express, i
already installed eslint dependency locally using
npm install --save-dev eslint
It runs in terminal when doing
eslint src/
but in vscode error are not highlighted or shown!
*my configuration file .eslintrc.js*
module.exports = {
env: {
browser: true,
commonjs: true,
es6: true,
},
extends: ["airbnb-base"],
globals: {
Atomics: "readonly",
SharedArrayBuffer: "readonly",
},
parserOptions: {
ecmaVersion: 2018,
},
rules: {},
};
*error output in vscode*
[Error - 11:22:53 PM]
Failed to load plugin 'import' declared in 'server\.eslintrc.js »
eslint-config-airbnb-base » D:\Documents
Box\Personal\Projects\travel_log\server\node_modules\eslint-config-airbnb-base\rules\imports.js'
: Cannot find module 'eslint-plugin-import'
Require stack:
- D:\Documents Box\Personal\Projects\travel_log\__placeholder__.js
Happened while validating D:\Documents Box\Personal\Projects\travel_log\
server\src\index.js
This can happen for a couple of reasons:
1. The plugin name is spelled incorrectly in an ESLint configuration file (e
.g. .eslintrc).
2. If ESLint is installed globally, then make sure 'eslint-plugin-import' is
installed globally as well.
3. If ESLint is installed locally, then 'eslint-plugin-import' isn't
installed correctly.
Consider running eslint --debug D:\Documents
Box\Personal\Projects\travel_log\server\src\index.js from a terminal to
obtain a trace about the configuration files used.
What is the solution?
--
You received this message because you are subscribed to the Google Groups
"ESLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/eslint/3125e515-2d5d-47d6-86cc-703a650d0c28%40googlegroups.com.