Fine-tuning the @typescript-eslint/no-unused-vars rule

We now allow parameters to be unused. This is quite common in inherited methods.
This allows removing a bunch of: //eslint-disable-next-line @typescript-eslint/no-unused-vars
Also, "err" variables in catch MUST now be used and the special _exhaustiveCheck variable used in ":never" assigns can be unused.
This commit is contained in:
David Négrier
2022-04-22 17:46:02 +02:00
parent db11a465ef
commit 5cc97483e0
20 changed files with 15 additions and 76 deletions
-1
View File
@@ -71,7 +71,6 @@ export class Zone {
/**
* Notify listeners of this zone that this user entered
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
private notifyEnter(thing: Movable, oldZone: Zone | null, position: PositionInterface) {
for (const listener of this.listeners) {
this.onEnters(thing, oldZone, listener);
@@ -4,12 +4,10 @@ import { VariablesRepositoryInterface } from "./VariablesRepositoryInterface";
* Mock class in charge of NOT saving/loading variables from the data store
*/
export class VoidVariablesRepository implements VariablesRepositoryInterface {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
loadVariables(roomUrl: string): Promise<{ [key: string]: string }> {
return Promise.resolve({});
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
saveVariable(roomUrl: string, key: string, value: string): Promise<number> {
return Promise.resolve(0);
}