eslint-plugin-misc

ESLint plugin

This project is maintained by iliubinskii

typescript/require-prop-type-annotation

ESLint plugin / typescript/require-prop-type-annotation

Requires type annotation for class properties.

module.exports = {
  plugins: ["misc"],
  rules: {
    "misc/typescript/require-prop-type-annotation": "error"
  }
};

Examples of incorrect code

class C {
  x;
}

Examples of correct code

class C {
  x: string;
  y = "";
}