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.
This rule allows you to enforce require or disallow semicolons instead of ASI in class property.
This rule accepts a single options argument. default always
, it for require semicolons, never
for disallow semicolons.
{
"proposal/class-property-semi": ["error", "always"]
}
class A {
static foo = 'Alice';
bar = () => {};
}
/* eslint proposal/class-property-semi: ["error", "never"] */
class A {
static foo='Alice'
bar=() => {}
}