( Been banging my head on this issue for a couple hours, tried different versions of node and npm, tried different config settings, any others getting this? Am I troubleshooting this all wrong?!)
When I run ESLint from the command line it works just fine:
eslint --ext .jsx,.js,.tsx,.ts --max-warnings 0 ./src
When I install the dbaeumer.vscode-eslint extension it doesn't start & this is printed in the Output tab (Dropdown: ESLint)
[Info - 1:20:32 PM] ESLint server stopped.
[Info - 1:20:33 PM] ESLint server running in node v8.9.0
[Info - 1:20:34 PM] ESLint server is running.
[Info - 1:20:35 PM] ESLint library loaded from: /home/j/Repos/sam/sam-frontend/node_modules/eslint/lib/api.js
(node:2115) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to load plugin '@typescript-eslint' declared in 'sam-frontend/.eslintrc.js': Cannot find module '@typescript-eslint/eslint-plugin'
Require stack:
- /home/j/Repos/sam/__placeholder__.js
Referenced from: /home/j/Repos/sam/sam-frontend/.eslintrc.js
(node:2115) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:2115) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Failed to load plugin '@typescript-eslint' declared in 'sam-frontend/.eslintrc.js': Cannot find module '@typescript-eslint/eslint-plugin'
Require stack:
- /home/j/Repos/sam/__placeholder__.js
Referenced from: /home/j/Repos/sam/sam-frontend/.eslintrc.js
from .eslintrc.js
module.exports = {
"parser": "@typescript-eslint/parser",
"extends": [
"airbnb",
"plugin:@typescript-eslint/recommended"
],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"env": {
"browser": true,
"jest/globals": true
},
"plugins": [
"jest"
],
"rules": { ... }
}
from package.json
...
"eslint": "6.5.1",
"eslint-config-airbnb": "17.0.0",
"eslint-plugin-import": "2.13.0",
"eslint-plugin-jest": "21.18.0",
"eslint-plugin-jsx-a11y": "6.1.1",
"eslint-plugin-react": "7.14.2",
"@typescript-eslint/eslint-plugin": "2.3.3",
"@typescript-eslint/parser": "2.3.2",
...
from my vscode settings:
"eslint.runtime": "node"
node version: v8.9.0
npm version: 5.10.0
I expect to get the same output when running from CLI vs through the plugin (especially when I set the node version to be the same as well), but there's clearly further differences, and maybe some other configuration I'm missing? Can I get extended debug output from the vscode extension somewhere?
The error output Failed to load plugin '@typescript-eslint' declared in 'sam-frontend/.eslintrc.js': Cannot find module '@typescript-eslint/eslint-plugin' leads me to think I had a typo or a missing package, but I've double checked that so many times now I'm certain that I've got tunnelvision here, and that the problem is somewhere else entirely. Is there a version mismatch between the different moving parts? (eslint + @typescript-eslint/eslint-plugin + node + npm)
Is it because I'm using the *.js style of configuration file? (I tried switching once to a JSON .eslintrc, but I haven't tried all permutations of this yet).
Am i even submitting this in the right place? My gut tells me this is an extension issue, but could it be a vscode issue?
What happend when you run the local installed eslint which the extension is using in the terminal. E.g. ./node_modules/.bin/eslint --ext .jsx,.js,.tsx,.ts --max-warnings 0 ./src
If this works can you provide me with a GitHub repository I can clone that demos this.
Works normally if I run with local istalled eslint ./node_modules/.bin/eslint --ext .jsx,.js,.tsx,.ts --max-warnings 0 ./src (same as when I run via npm scripts)
Edit:
I'll try recreate the problem in a repo later today/tomorrow, right now it's closed source at work. :)
ok, so this is strange (at least I seem to have narrowed it down a bit while creating a minimal example of the behaviour)
Apparently it matters where I open vscode? (workspace root?), maybe something to do with relative paths in some config setting somewhere.

ok, now I feel pretty stupid, turns out I was just not setting the workingDirectories! (didn't read the documentation thoroughly 馃う鈥嶁檪 )
"eslint.workingDirectories": ["./sam-frontend"]
with the above it works perfectly!
Good to see you found a solution. I guess you needed to run eslint in the terminal from sam-frontend as well. In the workspace folder it very likely showed the same problems. In general if you have to cd into a directory to make eslint in the terminal work you need to specify eslint.workingDirectories. There is a new value for working directories that does some auto inference which would have worked in your case as well ([{ "mode": "auto" }])
I ran into this same problem and I made the same mistake. Setting the workingDirectories in my workspace settings file resolved this problem!
Most helpful comment
ok, now I feel pretty stupid, turns out I was just not setting the workingDirectories! (didn't read the documentation thoroughly 馃う鈥嶁檪 )
with the above it works perfectly!