markmcdermott.io (js, ruby, ...etc) by mark mcdermott

Auto-Fix On Save

08/15/2024

estimated reading time:1 min

Let’s look at how to use ESLint to keep our Vue JavaScript clean looking. Specifically, we’ll use antfu’s eslint-config which are nice presets including auto-fix on save and a nice one line CLI install tool.

  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "always",
    "source.organizeImports": "always"
  },
"lint": "npx eslint .",
"lint:fix": "npx eslint . --fix"