Skip to content

Commit

Permalink
Disable class-methods-use-this lint rule (#1391)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brainicism authored Jul 4, 2022
1 parent adcda9a commit da49413
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 18 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,6 @@
}
],
"no-bitwise": ["off"],
"class-methods-use-this": ["warn", { "exceptMethods": ["call", "help", "resetPremium", "isUsingPremiumOption"] }]
"class-methods-use-this": ["off"]
}
}
1 change: 0 additions & 1 deletion src/helpers/bot_listing_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export default class BotListingManager {
}
}

// eslint-disable-next-line class-methods-use-this
private async postStat(siteConfigKeyName: string): Promise<void> {
const botListing = BOT_LISTING_SITES[siteConfigKeyName];
const { ipc } = State;
Expand Down
2 changes: 0 additions & 2 deletions src/kmq_worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const logger = new IPCLogger("kmq");
config({ path: path.resolve(__dirname, "../.env") });

export default class BotWorker extends BaseClusterWorker {
// eslint-disable-next-line class-methods-use-this
handleCommand = async (commandName: string): Promise<any> => {
logger.debug(`Received cluster command: ${commandName}`);
if (commandName.startsWith("eval")) {
Expand Down Expand Up @@ -93,7 +92,6 @@ export default class BotWorker extends BaseClusterWorker {
}
};

// eslint-disable-next-line class-methods-use-this
shutdown = async (done): Promise<void> => {
logger.debug("SHUTDOWN received, cleaning up...");

Expand Down
1 change: 0 additions & 1 deletion src/structures/elimination_player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export default class EliminationPlayer extends Player {
/**
* @returns whether to include this player in the scoreboard
*/
// eslint-disable-next-line class-methods-use-this
shouldIncludeInScoreboard(): boolean {
return true;
}
Expand Down
1 change: 0 additions & 1 deletion src/structures/game_round.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,6 @@ export default class GameRound extends Round {
return `${correctDescription}\n${uniqueSongMessage}`;
}

// eslint-disable-next-line class-methods-use-this
getEndRoundColor(correctGuess: boolean, userBonusActive: boolean): number {
if (correctGuess) {
if (userBonusActive) {
Expand Down
2 changes: 0 additions & 2 deletions src/structures/game_session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ export default class GameSession extends Session {
this.syncAllVoiceMembers();
}

// eslint-disable-next-line class-methods-use-this
sessionName(): string {
return "Game Session";
}
Expand Down Expand Up @@ -644,7 +643,6 @@ export default class GameSession extends Session {
return this.correctGuesses;
}

// eslint-disable-next-line class-methods-use-this
isGameSession(): this is GameSession {
return true;
}
Expand Down
1 change: 0 additions & 1 deletion src/structures/listening_round.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export default class ListeningRound extends Round {
);
}

// eslint-disable-next-line class-methods-use-this
getEndRoundColor(_correctGuess: boolean, userBonusActive: boolean): number {
if (userBonusActive) {
return EMBED_SUCCESS_BONUS_COLOR;
Expand Down
3 changes: 0 additions & 3 deletions src/structures/listening_session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,10 @@ export default class ListeningSession extends Session {
super.updateOwner();
}

// eslint-disable-next-line class-methods-use-this
isListeningSession(): this is ListeningSession {
return true;
}

// eslint-disable-next-line class-methods-use-this
sessionName(): string {
return "Listening Session";
}
Expand Down Expand Up @@ -212,7 +210,6 @@ export default class ListeningSession extends Session {
* @param randomSong - The queried song
* @returns the new GameRound
*/
// eslint-disable-next-line class-methods-use-this
protected prepareRound(randomSong: QueriedSong): Round {
return new ListeningRound(randomSong);
}
Expand Down
1 change: 0 additions & 1 deletion src/structures/round.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ export default abstract class Round {
return this.skippers.size;
}

// eslint-disable-next-line class-methods-use-this
protected getUniqueSongCounterMessage(
messageContext: MessageContext,
uniqueSongCounter: UniqueSongCounter
Expand Down
4 changes: 0 additions & 4 deletions src/structures/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,10 @@ export default abstract class Session {
}
}

// eslint-disable-next-line class-methods-use-this
isListeningSession(): this is ListeningSession {
return false;
}

// eslint-disable-next-line class-methods-use-this
isGameSession(): this is GameSession {
return false;
}
Expand Down Expand Up @@ -944,7 +942,6 @@ export default abstract class Session {
return sendInfoMessage(messageContext, embed, shouldReply, false);
}

// eslint-disable-next-line class-methods-use-this
private getDurationFooter(
locale: LocaleType,
timeRemaining: number,
Expand Down Expand Up @@ -998,7 +995,6 @@ export default abstract class Session {
this.startRound(messageContext);
}

// eslint-disable-next-line class-methods-use-this
private getAliasFooter(
guessModeType: GuessModeType,
locale: LocaleType,
Expand Down
1 change: 0 additions & 1 deletion src/structures/team.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ export default class Team extends Player {
/**
* @returns whether to include this team in the scoreboard
*/
// eslint-disable-next-line class-methods-use-this
shouldIncludeInScoreboard(): boolean {
return true;
}
Expand Down

0 comments on commit da49413

Please sign in to comment.