ESLINT: Parsing error: Unexpected token in package.json ESLINT: Parsing error: Unexpected token in package.json json json

ESLINT: Parsing error: Unexpected token in package.json


ESLint is for validating JavaScript, not JSON.

From the website:

ESLint

The pluggable linting utility for JavaScript and JSX

[emphasis mine]

(You can try your code on the online demo here, and you get the same error)

If you want to use ESLint on a JSON file, you could use a package like eslint-plugin-json.