From 502c2f0777966472a36a3a435893002a485e229b Mon Sep 17 00:00:00 2001 From: Bertie690 <136088738+Bertie690@users.noreply.github.com> Date: Wed, 13 Aug 2025 06:44:39 -0400 Subject: [PATCH 1/5] Added more biome rules --- biome.jsonc | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/biome.jsonc b/biome.jsonc index d2f7c711dc9..e21c468dc50 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -54,7 +54,7 @@ "rules": { "recommended": true, "correctness": { - "noUndeclaredVariables": "off", + "noUndeclaredVariables": "error", "noUnusedVariables": "error", "noSwitchDeclarations": "error", "noVoidTypeReturn": "error", @@ -67,6 +67,8 @@ "noPrivateImports": "error" }, "style": { + "noDoneCallback": "error", + "useForOf": "error', "useEnumInitializers": "off", // large enums like Moves/Species would make this cumbersome "useBlockStatements": { "level": "error", @@ -83,7 +85,7 @@ "level": "warn", "fix": "none" }, - "useSingleVarDeclarator": "off", + "useSingleVarDeclarator": "warn", // TODO: upgrade to "error" "useNodejsImportProtocol": "off", "useTemplate": "off", // string concatenation is faster: https://stackoverflow.com/questions/29055518/are-es6-template-literals-faster-than-string-concatenation "useAsConstAssertion": "error", @@ -110,18 +112,19 @@ // This can likely be enabled for all non-utils files once these are eventually reworked, but until then we leave it off. "noExplicitAny": "off", "noAssignInExpressions": "off", - "noPrototypeBuiltins": "off", + "noPrototypeBuiltins": "off", // TOZO: consider enabling? "noFallthroughSwitchClause": "error", // Prevents accidental automatic fallthroughs in switch cases (use disable comment if needed) "noImplicitAnyLet": "warn", // TODO: Refactor and make this an error "noRedeclare": "info", // TODO: Refactor and make this an error - "noGlobalIsNan": "off", + "noGlobalIsNan": "error", "noAsyncPromiseExecutor": "warn", // TODO: Refactor and make this an error "noVar": "error", "noDocumentCookie": "off" // Firefox has minimal support for the "Cookie Store API" }, "complexity": { + "noUselessStringConcat": "error", "noExcessiveCognitiveComplexity": "info", // TODO: Refactor and make this an error - "useLiteralKeys": "off", + "useLiteralKeys": "off", // TODO: enable? "noForEach": "off", // Foreach vs for of is not that simple. "noUselessSwitchCase": "off", // Explicit > Implicit "noUselessConstructor": "error", @@ -132,13 +135,16 @@ }, "performance": { "noNamespaceImport": "error", - "noDelete": "error" + "noDelete": "error", + "noBarrelFile": "error", }, "nursery": { + "useSingleJsDocAsterisk": "error", + "useUnifiedTypeSignature": "info", // TODO: promote to "error" at some pt "useAdjacentGetterSetter": "error", "noConstantBinaryExpression": "error", "noTsIgnore": "error", - "noAwaitInLoop": "off", + "noAwaitInLoop": "off", // we do this a lot "useJsonImportAttribute": "off", // "Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'. ts(2823)" "useIndexOf": "error", "useObjectSpread": "error", From c787b0b6149a1930e9c6ecb76fa9e6dbbe0699b7 Mon Sep 17 00:00:00 2001 From: Bertie690 <136088738+Bertie690@users.noreply.github.com> Date: Wed, 13 Aug 2025 06:58:15 -0400 Subject: [PATCH 2/5] Fixes --- biome.jsonc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/biome.jsonc b/biome.jsonc index e21c468dc50..94053339f50 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -68,7 +68,7 @@ }, "style": { "noDoneCallback": "error", - "useForOf": "error', + "useForOf": "error", "useEnumInitializers": "off", // large enums like Moves/Species would make this cumbersome "useBlockStatements": { "level": "error", @@ -140,7 +140,7 @@ }, "nursery": { "useSingleJsDocAsterisk": "error", - "useUnifiedTypeSignature": "info", // TODO: promote to "error" at some pt + // "useUnifiedTypeSignature": "error", TODO: upgrade to biome 2.1 and enable "useAdjacentGetterSetter": "error", "noConstantBinaryExpression": "error", "noTsIgnore": "error", From abeea9d219d1cc5f592257c852166bca280c82db Mon Sep 17 00:00:00 2001 From: Bertie690 <136088738+Bertie690@users.noreply.github.com> Date: Wed, 13 Aug 2025 10:26:26 -0400 Subject: [PATCH 3/5] Added a few more rules --- biome.jsonc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/biome.jsonc b/biome.jsonc index 94053339f50..70d9d9dae42 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -67,8 +67,11 @@ "noPrivateImports": "error" }, "style": { + "useCollapsedIf": "warn", // TODO: promote to "error" eventually "noDoneCallback": "error", - "useForOf": "error", + "noSubstr": "error", + "noYoda": "warn", // TODO: Fix and promote to "error" + "useForOf": "warn", // TODO: Fix and promote to "error" "useEnumInitializers": "off", // large enums like Moves/Species would make this cumbersome "useBlockStatements": { "level": "error", From 7faaaca4859da0b72e519573bf232bd84c8b7804 Mon Sep 17 00:00:00 2001 From: Bertie690 <136088738+Bertie690@users.noreply.github.com> Date: Wed, 13 Aug 2025 10:27:33 -0400 Subject: [PATCH 4/5] Added global phaser to biome --- biome.jsonc | 1 + 1 file changed, 1 insertion(+) diff --git a/biome.jsonc b/biome.jsonc index 70d9d9dae42..055624cc90c 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -162,6 +162,7 @@ "quoteStyle": "double", "arrowParentheses": "asNeeded" }, + "globals": ["Phaser"], "parser": { "jsxEverywhere": false } From e5499a9cdffb800e5f9003141b8ef17ed9991726 Mon Sep 17 00:00:00 2001 From: Bertie690 <136088738+Bertie690@users.noreply.github.com> Date: Wed, 13 Aug 2025 11:06:37 -0400 Subject: [PATCH 5/5] Fix tpyo --- biome.jsonc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/biome.jsonc b/biome.jsonc index 055624cc90c..5386e5a0a0a 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -70,7 +70,7 @@ "useCollapsedIf": "warn", // TODO: promote to "error" eventually "noDoneCallback": "error", "noSubstr": "error", - "noYoda": "warn", // TODO: Fix and promote to "error" + "noYodaExpression": "warn", // TODO: Fix and promote to "error" "useForOf": "warn", // TODO: Fix and promote to "error" "useEnumInitializers": "off", // large enums like Moves/Species would make this cumbersome "useBlockStatements": {