Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 817 Bytes

separate-choices.md

File metadata and controls

37 lines (24 loc) · 817 Bytes

@peggyjs/separate-choices

Ensure that each top-level choice in a rule is on a new line.

  • ⭐️ This rule is included in plugin:@peggyjs/recommended preset.
  • ✒️ This rule will fix all errors it finds.

📖 Rule Details

Rules often contain a set of choices, separated by "/". Current best practice is to put each of these choices on a separate line.

👎 Examples of incorrect code for this rule:

// eslint @peggyjs/separate-choices

foo = "bar" / "boo"

👍 Examples of correct code for this rule:

// eslint @peggyjs/separate-choices

foo
  = "bar"
  / "boo"

Whitespace insertion

See Settings.

🔎 Implementation