.eslintrc.json has unexpected token?

I'm trying to run ESlint through the Webstorm editor. I apparently have an unexpected token in my `.eslintrc.json` file.
However, Webstorm merely tells me that I have an unexpected token - not where it is.

This is my `.eslintrc.json` file. It has been verified as being proper JSON at jsonlint.com.

    {
      "parserOptions": {
        "ecmaVersion": 8,
        "sourceType": "script"
      },
      "rules": {
        "semi": ["error", "always"],
        "linebreak-style": ["error", "unix"]
      },
      "env": {
        "browser": true
      }
    }


Here you can see the Webstorm error message:

 

 

0
2 comments

the issue likely has no relation to the json itself, it's a parser error thrown by ESLint on initializing (can be related to the code being linted, for example). Please try running eslint in terminal - does it work?

0

Please sign in to leave a comment.