1
votes

I have a node project and am using VSCode. I can't get ESLint or Prettier to work properly, they are not highlighting errors or auto-formatting code.

The only output I am getting is:

(node:74324) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: ) SyntaxError: Unexpected token ...

I've been through the setup multiple times and believe I have my .eslintrc.json and .prettierrc.json set up properly. The error seems like it might be that the linters are not recognizing more modern javascript like object rest spread, but, I have experimented with adding "parser": "babel-eslint" to my ESLint settings file, and "ecmaVersion": 2018, to parserOptions, but to no avail.

Is there something I am missing to get these tools working?

1

1 Answers

3
votes

I had similar problem yesterday. It helped to upgrade VSCode to version 1.36.1. Than Eslint works fine.