Skip to content

no-immediate-mutation: option to allow big values #2816

@fisker

Description

@fisker

Description

Maybe sometimes an assignment should be preferred due to the code size.

For example

const object = {}
object.foo = function () {
  // the body only needs to indent one level
}
const object = {
  foo() {
    // now requires 2-level indentation
  }
}

A real world case prettier/prettier@9047a40

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions