ESLint plugin
This project is maintained by iliubinskii
ESLint plugin / typescript/prefer-class-method
Requires use of class methods instead of function properties.
module.exports = {
plugins: ["misc"],
rules: {
"misc/typescript/prefer-class-method": "error"
}
};
class SampleClass {
static f = () => {};
g = () => {};
}
class SampleClass1 {
static f: F = () => {};
g: G = () => {};
}
class SampleClass2 {
static f() {}
g() {}
}