I am currently wondering, why ESLint is not working in my project in Visual Studio 2017. There is the file ".eslintrc" in the project-root:
{
"extends": "defaults/configurations/eslint",
"env": {
"browser": true
},
"globals": {
"xhr": true
},
"rules": {
"eqeqeq": [ "error", "always", { "null": "ignore" } ]
}
}
If I remove the line with "eqeqeq", everything is working fine. But as soon as I add this line, no errors will be displayed at all.
Question 1: Is there any way to see an error-message about the issue ESLint obviously has?
Question 2 as a fallback: What is the issue with this line?
Did you set up library execution? The ESLint plugin requires permission to execute the local ESLint installation from your node_modules . Open the command palette ( Ctrl / Cmd + Shift + P ) and select ESLint: Manage Library Execution to open the dialog for your project and confirm with 'Accept'.
Once you have a eslintrc file provided (either created by yourself or provided internally by a tool like create-react-app), you can make the ESLint warnings/errors visible in VS Code by installing the ESLint extension from the VS Code Marketplace. }, "eslint.
Thanks to btmills I took a dive into the sources and found the version: VS 2017 uses ESLint 2.0.0 (released 2016-02-12).
The correct configuration is:
"eqeqeq": [ 2, "allow-null" ]
Documentation is available here:
The links from the error-list in VS 2017 lead to the current documentation, where you can find many features that do not work in version 2.0.0.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With