Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 965 Bytes

semi.md

File metadata and controls

47 lines (32 loc) · 965 Bytes

@peggyjs/semi

Enforce consistent use of semicolons

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

📖 Rule Details

Much like the ESlint rule of the same name, this rule can either enforce that semicolons are used after every rule, or that they are never used. Evn if semicolons should always be used, there should never be more than one.

👎 Examples of incorrect code for this rule:

// eslint @peggyjs/semi: "always"

foo = "bar"
foo = "bar";;
foo = "bar"; /* Comment */;
// eslint @peggyjs/semi: "never"

foo = "bar";

👍 Examples of correct code for this rule:

// eslint @peggyjs/semi: "always"

foo = "bar";
// eslint @peggyjs/semi: "never"

foo = "bar"

🔎 Implementation