Skip to content

Add code action to format with prettier in codeActionsOnSave in VS Code #1555

Open
@bhajneet

Description

@bhajneet

Originally posted by @rohit-gohri in #1277 (comment) is a working solution for running prettier before eslint.

The above solution runs the default formatter (which can be set to Prettier) then uses the code action for eslint afterwards.

There is already one example of a code action to create a config file in this extension.

Could a code action be added for formatting? Such that if a user were to hit ctrl+shift+p in VS Code it would show something like "Prettier: Format Document"

Here are examples from Microsoft

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementhelp-wantedNot something we plan on doing, but we will take a pull request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions