--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalidMethodParameters.ts --- # Input ```ts class D { constructor(a: number) {} f(a: number) {} set a(a: number) {} } console.log(new D()); export {} ``` # Diagnostics ``` invalidMethodParameters.ts:2:14 lint/correctness/noUnusedVariables FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━ ! This parameter is unused. 1 │ class D { > 2 │ constructor(a: number) {} │ ^ 3 │ f(a: number) {} 4 │ set a(a: number) {} i Unused variables usually are result of incomplete refactoring, typos and other source of bugs. i Unsafe fix: If this is intentional, prepend a with an underscore. 1 1 │ class D { 2 │ - → constructor(a:·number)·{} 2 │ + → constructor(_a:·number)·{} 3 3 │ f(a: number) {} 4 4 │ set a(a: number) {} ``` ``` invalidMethodParameters.ts:3:4 lint/correctness/noUnusedVariables FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━ ! This parameter is unused. 1 │ class D { 2 │ constructor(a: number) {} > 3 │ f(a: number) {} │ ^ 4 │ set a(a: number) {} 5 │ } i Unused variables usually are result of incomplete refactoring, typos and other source of bugs. i Unsafe fix: If this is intentional, prepend a with an underscore. 1 1 │ class D { 2 2 │ constructor(a: number) {} 3 │ - → f(a:·number)·{} 3 │ + → f(_a:·number)·{} 4 4 │ set a(a: number) {} 5 5 │ } ``` ``` invalidMethodParameters.ts:4:8 lint/correctness/noUnusedVariables FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━ ! This parameter is unused. 2 │ constructor(a: number) {} 3 │ f(a: number) {} > 4 │ set a(a: number) {} │ ^ 5 │ } 6 │ console.log(new D()); i Unused variables usually are result of incomplete refactoring, typos and other source of bugs. i Unsafe fix: If this is intentional, prepend a with an underscore. 2 2 │ constructor(a: number) {} 3 3 │ f(a: number) {} 4 │ - → set·a(a:·number)·{} 4 │ + → set·a(_a:·number)·{} 5 5 │ } 6 6 │ console.log(new D()); ```