diff --git a/biome.jsonc b/biome.jsonc index 98e77eb6eb5..637eb2daafd 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -38,7 +38,18 @@ }, // TODO: Configure and enable import sorting - "assist": { "actions": { "source": { "organizeImports": "off" } } }, + "assist": { + "actions": { + "source": { + "organizeImports": { + "level": "off", + "options": { + "groups": [] + } + } + } + } + }, "linter": { "enabled": true, "rules": { @@ -53,7 +64,8 @@ "fix": "safe" }, "noUnusedFunctionParameters": "error", - "noUnusedLabels": "error" + "noUnusedLabels": "error", + "noPrivateImports": "error" }, "style": { "useEnumInitializers": "off", // large enums like Moves/Species would make this cumbersome @@ -108,16 +120,37 @@ "noUselessSwitchCase": "off", // Explicit > Implicit "noUselessConstructor": "error", "noBannedTypes": "warn", // TODO: Refactor and make this an error - "noThisInStatic": "error" + "noThisInStatic": "error", + "noUselessThisAlias": "error", + "noUselessTernary": "error" }, "performance": { "noNamespaceImport": "error", "noDelete": "error" + }, + "nursery": { + "useAdjacentGetterSetter": "warn", + "noConstantBinaryExpression": "warn", + "noTsIgnore": "warn", + "noAwaitInLoop": "warn", + "useJsonImportAttribute": "error", + "useIndexOf": "warn", + "useObjectSpread": "info", + "useNumericSeparators": "info", + "useIterableCallbackReturn": "warn", + "useSingleJsDocAsterisk": "warn", + "noShadow": "warn" } } }, "javascript": { - "formatter": { "quoteStyle": "double", "arrowParentheses": "asNeeded" } + "formatter": { + "quoteStyle": "double", + "arrowParentheses": "asNeeded" + }, + "parser": { + "jsxEverywhere": false + } }, "overrides": [ { @@ -130,6 +163,9 @@ }, "style": { "noNonNullAssertion": "off" + }, + "nursery": { + "noFloatingPromises": "error" } } } diff --git a/src/plugins/i18n.ts b/src/plugins/i18n.ts index 7d3b30ed5b0..470aeaf69b7 100644 --- a/src/plugins/i18n.ts +++ b/src/plugins/i18n.ts @@ -3,7 +3,7 @@ import i18next from "i18next"; import LanguageDetector from "i18next-browser-languagedetector"; import HttpBackend from "i18next-http-backend"; import processor, { KoreanPostpositionProcessor } from "i18next-korean-postposition-processor"; -import pkg from "../../package.json"; +import pkg from "../../package.json" with { type: "json" }; //#region Interfaces/Types diff --git a/src/ui/daily-run-scoreboard.ts b/src/ui/daily-run-scoreboard.ts index e19882b09cc..c069c6fffd7 100644 --- a/src/ui/daily-run-scoreboard.ts +++ b/src/ui/daily-run-scoreboard.ts @@ -41,24 +41,15 @@ export class DailyRunScoreboard extends Phaser.GameObjects.Container { this.setup(); } - /** - * Sets the updating state and updates button states accordingly. - * If value is true (updating), disables the buttons; if false, enables the buttons. - * @param {boolean} value - The new updating state. - */ - set isUpdating(value) { + /** When set to `true`, disables the buttons; when set to `false`, enables the buttons. */ + get isUpdating(): boolean { + return this._isUpdating; + } + set isUpdating(value: boolean) { this._isUpdating = value; this.setButtonsState(!value); } - /** - * Gets the current updating state. - * @returns {boolean} - The current updating state. - */ - get isUpdating() { - return this._isUpdating; - } - setup() { const titleWindow = addWindow(0, 0, 114, 18, false, false, undefined, undefined, WindowVariant.THIN); this.add(titleWindow); diff --git a/test/sprites/pokemonSprite.test.ts b/test/sprites/pokemonSprite.test.ts index a008b75b42e..bd65d86d22a 100644 --- a/test/sprites/pokemonSprite.test.ts +++ b/test/sprites/pokemonSprite.test.ts @@ -2,8 +2,8 @@ import { getAppRootDir } from "#test/sprites/spritesUtils"; import fs from "fs"; import path from "path"; import { beforeAll, describe, expect, it } from "vitest"; -import _masterlist from "../../public/images/pokemon/variant/_masterlist.json"; -import _exp_masterlist from "../../public/images/pokemon/variant/_exp_masterlist.json"; +import _masterlist from "../../public/images/pokemon/variant/_masterlist.json" with { type: "json" }; +import _exp_masterlist from "../../public/images/pokemon/variant/_exp_masterlist.json" with { type: "json" }; type PokemonVariantMasterlist = typeof _masterlist; type PokemonExpVariantMasterlist = typeof _exp_masterlist; @@ -26,9 +26,9 @@ describe("check if every variant's sprite are correctly set", () => { femaleVariant = masterlist.female; backVariant = masterlist.back; - // @ts-ignore + // @ts-expect-error delete masterlist.female; // TODO: resolve ts-ignore - //@ts-ignore + //@ts-expect-error delete masterlist.back; //TODO: resolve ts-ignore });