Support running the ESLint server in the WSL under Windows.
See original GitHub issueThis is the error I get in the output pane of Vscode. There is no log in the developer tools console.
[Info - 9:16:38 PM] ESLint server is running.
(node:11580) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): SyntaxError: Unexpected token .
I can lint the file fine if I start eslint in the console (Bash for Windows).
I do use Vscode in Windows 10, and eslint (and nodejs) is installed inside Bash for Windows (Linux subsystem). My Windows build is 15063.296
. Node.js version is v8.1.0
, eslint is v3.19.0
.
So I start the Windows version of Vscode but I point to eslint inside Linux with "eslint.nodePath"
.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:18 (7 by maintainers)
Top Results From Across the Web
eslint while on linux subsystem (WSL)? : r/vscode - Reddit
I've been migrating projects from Ubuntu dev machine to using Windows for dev with VSC and WSL. So far, most things are running...
Read more >Set up Node.js on WSL 2 - Windows - Microsoft Learn
A guide to help you get your Node.js development environment set up on Windows Subsystem for Linux (WSL).
Read more >Eslint not working on VSCode when using WSL Debian
I've installed the eslint extension on vscode and installed it as a dev dependency on WSL Debian and can run npx eslint just...
Read more >November 2022 (version 1.74) - Visual Studio Code
JavaScript debugging. Support for console.profile. The JavaScript debugger now supports console.profile. When running under the debugger, a CPU profile will be ...
Read more >ESLint | WebStorm Documentation - JetBrains
Configure ESLint manually · In the Settings/Preferences dialog ( Ctrl+Alt+S ), go to Languages & Frameworks | JavaScript | Code Quality Tools | ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Found a more reliable way to use WSL-installed node & eslint, using the
wsl
wrapper command that is part of WSL.node.bat
:node
replaced byeslint
(Can repeat this for whatever other commands you need to be made available).eslint.nodePath
toC:\\path\\to\\batch\\file\\node.bat
(note the double backslashes)Will close the issue since there is nothing to do in the ESLint extension 😃