mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-30 10:02:17 +00:00
Enable the prefer-destructuring eslint rule (#1858)
## Description: Enable the `prefer-destructuring` eslint rule. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced
This commit is contained in:
@@ -90,7 +90,7 @@ export async function startMaster() {
|
||||
cluster.on("message", (worker, message) => {
|
||||
if (message.type === "WORKER_READY") {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
const workerId = message.workerId;
|
||||
const { workerId } = message;
|
||||
readyWorkers.add(workerId);
|
||||
log.info(
|
||||
`Worker ${workerId} is ready. (${readyWorkers.size}/${config.numWorkers()} ready)`,
|
||||
|
||||
@@ -89,7 +89,7 @@ export async function startWorker() {
|
||||
app.post(
|
||||
"/api/create_game/:id",
|
||||
gatekeeper.httpHandler(LimiterType.Post, async (req, res) => {
|
||||
const id = req.params.id;
|
||||
const { id } = req.params;
|
||||
const creatorClientID = (() => {
|
||||
if (typeof req.query.creatorClientID !== "string") return undefined;
|
||||
|
||||
|
||||
@@ -169,8 +169,7 @@ async function handleJoinMessage(
|
||||
success: false,
|
||||
};
|
||||
}
|
||||
roles = result.player.roles;
|
||||
flares = result.player.flares;
|
||||
({ roles, flares } = result.player);
|
||||
|
||||
if (allowedFlares !== undefined) {
|
||||
// Login is required
|
||||
|
||||
Reference in New Issue
Block a user