Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 832 Bytes

class-property-semi.md

File metadata and controls

38 lines (27 loc) · 832 Bytes

require or disallow semicolons instead of ASI in class property (proposal/class-property-semi)

This rule allows you to enforce require or disallow semicolons instead of ASI in class property.

The --fix option on the command line can automatically fix some of the problems reported by this rule.

Rule Details

This rule allows you to enforce require or disallow semicolons instead of ASI in class property.

Options

This rule accepts a single options argument. default always, it for require semicolons, never for disallow semicolons.

{
  "proposal/class-property-semi": ["error", "always"]
}

always

class A {
  static foo = 'Alice';
  bar = () => {};
}

never

/* eslint proposal/class-property-semi: ["error", "never"] */
class A {
  static foo='Alice'
  bar=() => {}
}