πΌ This rule is enabled in the following configs: β
recommended, βοΈ unopinionated.
π§ This rule is automatically fixable by the --fix CLI option.
A class with only static members could just be an object instead.
// β
class X {
static foo = false;
static bar() {};
}
// β
const X = {
foo: false,
bar() {},
};// β
class X {
static foo = false;
static bar() {}
constructor() {}
}// β
class X {
static foo = false;
static bar() {}
unicorn() {}
}// β
class X {
static #foo = false;
static bar() {}
}