From 003d4d9d1321634d102c971b685397bf1fd963b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sascha=20K=C3=BChl?= Date: Fri, 30 May 2025 13:41:09 +0200 Subject: [PATCH] fixed some linter warnings --- backend/controllers/team.controller.js | 1 - backend/migrations/02-create-role.js | 2 +- backend/migrations/03-create-user-roles.js | 2 +- backend/migrations/05-create-pitch-type.js | 2 +- backend/migrations/06-create-bullpen-session.js | 2 +- backend/migrations/07-create-pitch.js | 2 +- backend/migrations/08-create-position.js | 2 +- backend/migrations/10-create-player-position.js | 2 +- backend/migrations/11-create-team.js | 2 +- backend/migrations/12-create-player-team.js | 2 +- backend/migrations/13-move-user-data-to-player.js | 2 +- backend/test/position.test.js | 2 +- 12 files changed, 11 insertions(+), 12 deletions(-) diff --git a/backend/controllers/team.controller.js b/backend/controllers/team.controller.js index 7660ddd..58b6000 100644 --- a/backend/controllers/team.controller.js +++ b/backend/controllers/team.controller.js @@ -1,6 +1,5 @@ const db = require("../models/index"); const Team = db.Team; -const Player = db.Player; const Op = db.Sequelize.Op; exports.insert = (req, res) => { diff --git a/backend/migrations/02-create-role.js b/backend/migrations/02-create-role.js index e25ab61..0af0409 100644 --- a/backend/migrations/02-create-role.js +++ b/backend/migrations/02-create-role.js @@ -21,7 +21,7 @@ module.exports = { } }); }, - async down(queryInterface, Sequelize) { + async down(queryInterface, _Sequelize) { await queryInterface.dropTable('Roles'); } }; diff --git a/backend/migrations/03-create-user-roles.js b/backend/migrations/03-create-user-roles.js index 3237d50..871c85e 100644 --- a/backend/migrations/03-create-user-roles.js +++ b/backend/migrations/03-create-user-roles.js @@ -37,7 +37,7 @@ module.exports = { }); }, - async down (queryInterface, Sequelize) { + async down (queryInterface, _Sequelize) { await queryInterface.dropTable('UserRoles'); } }; diff --git a/backend/migrations/05-create-pitch-type.js b/backend/migrations/05-create-pitch-type.js index 7ce9ce9..1bae778 100644 --- a/backend/migrations/05-create-pitch-type.js +++ b/backend/migrations/05-create-pitch-type.js @@ -24,7 +24,7 @@ module.exports = { } }); }, - async down(queryInterface, Sequelize) { + async down(queryInterface, _Sequelize) { await queryInterface.dropTable('PitchTypes'); } }; diff --git a/backend/migrations/06-create-bullpen-session.js b/backend/migrations/06-create-bullpen-session.js index 6be1156..d60457f 100644 --- a/backend/migrations/06-create-bullpen-session.js +++ b/backend/migrations/06-create-bullpen-session.js @@ -27,7 +27,7 @@ module.exports = { } }); }, - async down(queryInterface, Sequelize) { + async down(queryInterface, _Sequelize) { await queryInterface.dropTable('BullpenSessions'); } }; diff --git a/backend/migrations/07-create-pitch.js b/backend/migrations/07-create-pitch.js index 5f38b38..46b7df3 100644 --- a/backend/migrations/07-create-pitch.js +++ b/backend/migrations/07-create-pitch.js @@ -45,7 +45,7 @@ module.exports = { } }); }, - async down(queryInterface, Sequelize) { + async down(queryInterface, _Sequelize) { await queryInterface.dropTable('Pitches'); } }; diff --git a/backend/migrations/08-create-position.js b/backend/migrations/08-create-position.js index 5f08497..7e7b02e 100644 --- a/backend/migrations/08-create-position.js +++ b/backend/migrations/08-create-position.js @@ -31,7 +31,7 @@ module.exports = { } }); }, - async down(queryInterface, Sequelize) { + async down(queryInterface, _Sequelize) { await queryInterface.dropTable('Positions'); } }; diff --git a/backend/migrations/10-create-player-position.js b/backend/migrations/10-create-player-position.js index 93af3aa..af45384 100644 --- a/backend/migrations/10-create-player-position.js +++ b/backend/migrations/10-create-player-position.js @@ -33,7 +33,7 @@ module.exports = { }); }, - async down (queryInterface, Sequelize) { + async down (queryInterface, _Sequelize) { await queryInterface.dropTable('PlayerPositions'); } }; diff --git a/backend/migrations/11-create-team.js b/backend/migrations/11-create-team.js index ed9de91..47452b9 100644 --- a/backend/migrations/11-create-team.js +++ b/backend/migrations/11-create-team.js @@ -27,7 +27,7 @@ module.exports = { } }); }, - async down(queryInterface, Sequelize) { + async down(queryInterface, _Sequelize) { await queryInterface.dropTable('Teams'); } }; diff --git a/backend/migrations/12-create-player-team.js b/backend/migrations/12-create-player-team.js index 80d12ee..44ebea0 100644 --- a/backend/migrations/12-create-player-team.js +++ b/backend/migrations/12-create-player-team.js @@ -33,7 +33,7 @@ module.exports = { }); }, - async down (queryInterface, Sequelize) { + async down (queryInterface, _Sequelize) { await queryInterface.dropTable('PlayerTeams'); } }; diff --git a/backend/migrations/13-move-user-data-to-player.js b/backend/migrations/13-move-user-data-to-player.js index 7639a64..9a63e20 100644 --- a/backend/migrations/13-move-user-data-to-player.js +++ b/backend/migrations/13-move-user-data-to-player.js @@ -1,6 +1,6 @@ /** @type {import('sequelize-cli').Migration} */ module.exports = { - async up(queryInterface, Sequelize) { + async up(queryInterface, _Sequelize) { await queryInterface.sequelize.query(` INSERT INTO "Players" ("userId", "height", "weight", "gender", "bats", "throws", "createdAt", "updatedAt") SELECT diff --git a/backend/test/position.test.js b/backend/test/position.test.js index ba9168c..f818fc7 100644 --- a/backend/test/position.test.js +++ b/backend/test/position.test.js @@ -2,7 +2,7 @@ const request = require("supertest") const { expect, describe, - test, beforeAll, afterAll, + test, } = require('@jest/globals'); const app = require("../app")