How to fix ESLint not working in VS Code?

Sometimes, we want to fix ESLint not working in VS Code.

In this article, we’ll look at how to fix ESLint not working in VS Code.

How to fix ESLint not working in VS Code?

To fix ESLint not working in VS Code, we add some options to settings.json.

For instance, we add

{
  //...
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "html",
    "typescriptreact"
  ]
  //...
}

in settings.json to enable validation with ESLint in VS Code.

We add this option to make ESLint validate JavaScript, JSX, HTML, and TypeScript React files.

Conclusion

To fix ESLint not working in VS Code, we add some options to settings.json.