1

https://github.com/Clev7/joystick this is the link to the project I'm currently writing with the eslintrc.json

I've installed the eslint extension on vscode and installed it as a dev dependency on WSL Debian and can run npx eslint just fine. For some reason, even though there aren't any errors from the linter, it's not doing anything on the filesystem.

Any ideas on what the issue could be? Is it because I'm using typescript and not just vanilla node? Or does eslint just not work on WSL?

Clever7-
  • 75
  • 1
  • 9
  • 1
    If you want eslint to automatically fix issues, you would have to run `npx eslint --fix`. But `npx eslint .` should atleast report which files have issues. So either your files don't have any issues or you have configured something wrong. – Ascendise Sep 27 '22 at 09:22
  • I mean I can definitely run npx eslint src/**.ts and that would work, but I'd have to run it every now and then. What I'm saying is if I did something like var x = 5, I should get a red line on VS Code showing me that I can't use var. – Clever7- Sep 27 '22 at 09:34
  • 1
    Does this answer your question? [ESLint not working in VS Code?](https://stackoverflow.com/questions/45093510/eslint-not-working-in-vs-code) – Ascendise Sep 27 '22 at 09:38
  • Sorry for the late reply. I tried using that post and now I get these errors "[Info - 11:53:09 PM] Error while loading rule '@typescript-eslint/dot-notation': You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser. Occurred while linting \\wsl$\Debian\home\cleverwolf\joystick\src\commands\Info\ping.ts" – Clever7- Sep 28 '22 at 03:54
  • I was able to get it to work. This guide was super helpful .https://khalilstemmler.com/blogs/typescript/eslint-for-typescript/ Thank you for your help! – Clever7- Sep 28 '22 at 04:23

0 Answers0