eslint-plugin-misc

ESLint plugin

This project is maintained by iliubinskii

typescript/class-methods-use-this

ESLint plugin / typescript/class-methods-use-this

This rule wraps “class-methods-use-this” core rule, but skips methods with “this: void” argument.

module.exports = {
  plugins: ["misc"],
  rules: {
    "misc/typescript/class-methods-use-this": "error"
  }
};

Examples of incorrect code

class SampleClass {
  f() {}
}

Examples of correct code

class SampleClass {
  f(this: void) {}
}