Skip to content

Add ESLint, Prettier run-on-save VSCode settings #302

@aentwist

Description

@aentwist

Description

When using ESLint, add a lint-on-save VSCode setting.

When using Prettier, add format-on-save and default formatter settings.

Proposed Solution

.vscode/settings.json

{
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "[html][css][less][scss][sass][javascript][typescript][javascriptreact][typescriptreact][vue][json][jsonc][yaml][markdown]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  }
}

Notes

Cross reference the Prettier language support with VSCode language identifiers and add everything applicable.

See https://prettier.io/docs/en/index.html
and https://code.visualstudio.com/docs/languages/identifiers#_known-language-identifiers

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions