--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: valid.jsonc --- # Input ```cjs class A { } ``` # Input ```cjs class A { constructor(a, b = 0){ } } ``` # Diagnostics ``` valid.jsonc:1:11 lint/complexity/noUselessConstructor FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This constructor is unnecessary. > 1 │ class A { constructor(a, b = 0){ } } │ ^^^^^^^^^^^^^^^^^^^^^^^^ i Unsafe fix: Remove the unnecessary constructor. 1 │ class·A·{·constructor(a,·b·=·0){·}·} │ ------------------------- ``` # Input ```cjs class A { constructor(){ doSomething(); } } ``` # Input ```cjs class A extends B { constructor(){} } ``` # Input ```cjs class A extends B { constructor(){ super('foo'); } } ``` # Input ```cjs class A extends B { constructor(foo, bar){ super(foo, bar, 1); } } ``` # Input ```cjs class A extends B { constructor(){ super(); doSomething(); } } ``` # Input ```cjs class A extends B { constructor(...args){ super(...args); doSomething(); } } ``` # Input ```cjs class A { dummyMethod(){ doSomething(); } } ``` # Input ```cjs class A extends B.C { constructor() { super(foo); } } ``` # Input ```cjs class A extends B { constructor(a, b, c) { super(a, b); } } ``` # Input ```cjs class A extends B { constructor(foo, bar){ super(foo); } } ``` # Input ```cjs class A extends B { constructor(test) { super(); } } ``` # Input ```cjs class A extends B { constructor() { foo; } } ``` # Input ```cjs class A extends B { constructor(foo, bar) { super(bar); } } ```