Skip to content

Shorthand Property and Method Names Option #779

@shiftgeist

Description

@shiftgeist

I wish there was an js/ts option to make dprint convert from

{
    name: name,
    id: id,
    avatar: avatar,
    timestamp: Date.now(),
    save: function () {
        // save message
    }
}

to

{
    name,
    id,
    avatar,
    timestamp: Date.now(),
    save () {
        //save message
    }
}

(Examples from https://fireship.dev/shorthand-properties)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions