V
V
vovashaplin2020-09-22 15:39:24
React
vovashaplin, 2020-09-22 15:39:24

How to make VS Code show errors in real time and put semicolons?

I set the Eslint config
https://github.com/ijsto/eslint-config-nextjs

If you write npm run lint in the console, then all errors are fixed according to the Airbnb standard
. But I would like the errors to be shown in real time.
In addition, automatic substitution ";" does not work. prettier'a.

I have EsLint and Prettier plugins.
Here is part of my settings.json

"[javascript]": {
    "editor.defaultFormatter": "vscode.typescript-language-features"
  },
  "emmet.includeLanguages": {
    "javascript": "javascriptreact",
    "postcss": "css"
  },
  "explorer.confirmDragAndDrop": false,
  "liveSassCompile.settings.autoprefix": [],
  "editor.tabSize": 2,
  "liveSassCompile.settings.generateMap": false,
  "files.autoSave": "afterDelay",
  "files.autoSaveDelay": 5000,
  "[csharp]": {
    "editor.defaultFormatter": "Leopotam.csharpfixformat"
  },
  "[html]": {
    "editor.defaultFormatter": "vscode.html-language-features"
  },
  // "typescript.validate.enable": false,
  // "javascript.validate.enable": false,
  "[typescript]": {
    "editor.defaultFormatter": "vscode.typescript-language-features",
    "editor.formatOnSave": false
  },
  // Run ESLint each time you save a file
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  // Disable Prettier for JavaScript and React (but not for HTML, CSS or others in future)
  "[javascriptreact]": {
    "editor.formatOnSave": false
  },
  "[jsonc]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "html",
    "typescriptreact"
  ],
  "[json]": {
    "editor.defaultFormatter": "vscode.json-language-features"
  },
  "prettier.semi": true
}


I've been fiddling with this for a long time, but I just need airbnb and ";"

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question