Skip to content

Support @prettier pragma comment #2397

@ajhyndman

Description

@ajhyndman

I'd like to propose a new option for prettier.

eslint-plugin-prettier supports a pragma comment. This comment tells eslint which files to apply prettier formatting rules to. This is a great affordance for incremental adoption in large codebases.

It would be great if prettier, when run over a codebase, could match this behaviour and respect a pragma comment.

Option would look something like:

$ prettier --pragma "@prettier" [filename ...]

Metadata

Metadata

Assignees

No one assigned

    Labels

    locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions