no-useless-constructor
Configuration
rslint.config.ts
Rule Details
Disallow unnecessary constructors.
ES2015 provides a default class constructor if one is not specified. As such, it is unnecessary to provide an empty constructor or one that simply delegates into its parent class, as in the following examples:
This rule extends ESLint's no-useless-constructor with TypeScript-specific support for:
- Access modifiers (
private,protected,public) - Parameter properties
- Parameter decorators
Examples of incorrect code for this rule:
Examples of correct code for this rule: