none
How do I configure the built in ESLint feature in my Visual Studio 2017 project?

    Question

  • Problem: I am trying to use Visual Studio 2017's built in ESLinting feature, but I would like to use my own config file. When I create my own config file, all ESLint errors disappear from the Error List.

    Context: I have the following .eslintrc.json file in the root directory of the project:

       {
        "env": {
            "browser": true
        },
        "extends": "eslint:recommended",
        "rules": {
            "indent": [
                3,
                "tab"
            ],
            "linebreak-style": [
                3,
                "windows"
            ],
            "quotes": [
                3,
                "double"
            ],
            "semi": [
                3,
                "always"
            ]
        }
    }
    

    I have the built in Enable ESLint option on.

    After I build the project and open a .js file in the project, there are no errors in the Error List.

    If I exclude the .eslintrc.json file from the project, rebuild, and reopen a .js file, ESLinting works in intellisense and appears to be using the recommended rules. However, I can't find much documentation on the built in ESLint feature or on how to properly configure ESLint in Visual Studio 2017. Sure enough, when I include my .eslintrc file again and rebuild, my intellisense is gone.

    I would prefer not to use node package manager or visual studio code.

    Question: How do I correctly include my .eslintrc configuration in a Visual Studio 2017 project so it works with the built in ESLint feature?

    Wednesday, June 7, 2017 5:47 PM

All replies