Skip to content

brace-style 1tbs with allowSingleLine should not allow else on separate line #12284

Closed
@kardasis

Description

@kardasis

What rule do you want to change?
brace-style

Does this change cause the rule to produce more or fewer warnings?
more

How will the change be implemented? (New option, new default behavior, etc.)?
new default behavior

Please provide some example code that this change will affect:

      if (condition) { doThisThing() } else {
        otherwiseDoThis()
      }

What does the rule currently do for this code?
It does not produce an error

What will the rule do after it's changed?
Produce an error indicating that you are mixing allowSingleLine with multiple lines

Are you willing to submit a pull request to implement this change?
yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    archived due to ageThis issue has been archived; please open a new issue for any further discussionauto closedThe bot closed this issuedocumentationRelates to ESLint's documentationenhancementThis change enhances an existing feature of ESLintevaluatingThe team will evaluate this issue to decide whether it meets the criteria for inclusionruleRelates to ESLint's core rules

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions