Skip to content

Add diff in output of --list-different #4612

@pronebird

Description

@pronebird

Hi,

Currently --list-different only prints the filenames of files that aren't formatted. It would be great to add an option to print out a diff between current and formatted source.

Maybe an extra option like --list-different --diff that would affect the way --list-different works. I believe in any case --list-different runs formatter on the source code, so it shouldn't be too hard to run it through some diff tool and output a nicely colored code to console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliIssues with Prettier's Command Line Interfacelocked-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