Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 142 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
{
"$schema": "https://biomejs.dev/schemas/2.5.0/schema.json",
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
"files": {
"ignoreUnknown": false,
"includes": ["**", "!build/**", "!.agent/**", "!src/evolution-types/**"]
},
"formatter": { "enabled": false },
"assist": { "enabled": false },
"linter": {
"enabled": true,
"rules": {
"recommended": false,
"complexity": {
"noBannedTypes": "error",
"noUselessThisAlias": "error",
"noUselessTypeConstraint": "error"
},
"correctness": { "noUnusedVariables": "error" },
"style": {
"noCommonJs": "error",
"noNamespace": "error",
"useArrayLiterals": "error",
"useAsConstAssertion": "error"
},
"suspicious": {
"noDuplicateEnumValues": "error",
"noExplicitAny": "error",
"noExtraNonNullAssertion": "error",
"noMisleadingInstantiator": "error",
"noNonNullAssertedOptionalChain": "error",
"noTsIgnore": "error",
"noUnsafeDeclarationMerging": "error",
"useNamespaceKeyword": "error"
}
}
},
"javascript": { "globals": [] },
"overrides": [
{
"includes": ["**/*.{js,mjs,cjs,ts,mts,cts}", "!build/**"],
"linter": {
"rules": {
"complexity": {
"noAdjacentSpacesInRegex": "error",
"noExtraBooleanCast": "error",
"noUselessCatch": "error",
"noUselessEscapeInRegex": "error"
},
"correctness": {
"noConstAssign": "error",
"noConstantCondition": "error",
"noEmptyCharacterClassInRegex": "error",
"noEmptyPattern": "error",
"noGlobalObjectCalls": "error",
"noInvalidBuiltinInstantiation": "error",
"noInvalidConstructorSuper": "error",
"noNonoctalDecimalEscape": "error",
"noPrecisionLoss": "error",
"noSelfAssign": "error",
"noSetterReturn": "error",
"noSwitchDeclarations": "error",
"noUndeclaredVariables": "error",
"noUnreachable": "error",
"noUnreachableSuper": "error",
"noUnsafeFinally": "error",
"noUnsafeOptionalChaining": "error",
"noUnusedLabels": "error",
"noUnusedPrivateClassMembers": "error",
"noUnusedVariables": "error",
"useIsNan": "error",
"useValidForDirection": "error",
"useValidTypeof": "error",
"useYield": "error"
},
"suspicious": {
"noAssignInExpressions": "error",
"noAsyncPromiseExecutor": "error",
"noCatchAssign": "error",
"noClassAssign": "error",
"noCompareNegZero": "error",
"noConstantBinaryExpressions": "error",
"noControlCharactersInRegex": "error",
"noDebugger": "error",
"noDuplicateCase": "error",
"noDuplicateClassMembers": "error",
"noDuplicateElseIf": "error",
"noDuplicateObjectKeys": "error",
"noDuplicateParameters": "error",
"noEmptyBlockStatements": "error",
"noFallthroughSwitchClause": "error",
"noFunctionAssign": "error",
"noGlobalAssign": "error",
"noImportAssign": "error",
"noIrregularWhitespace": "error",
"noMisleadingCharacterClass": "error",
"noPrototypeBuiltins": "error",
"noRedeclare": "error",
"noShadowRestrictedNames": "error",
"noSparseArray": "error",
"noUnsafeNegation": "error",
"noUselessRegexBackrefs": "error",
"noWith": "error",
"useGetterReturn": "error"
}
}
}
},
{
"includes": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
"linter": {
"rules": {
"complexity": { "noArguments": "error" },
"correctness": {
"noConstAssign": "off",
"noGlobalObjectCalls": "off",
"noInvalidBuiltinInstantiation": "off",
"noInvalidConstructorSuper": "off",
"noSetterReturn": "off",
"noUndeclaredVariables": "off",
"noUnreachable": "off",
"noUnreachableSuper": "off"
},
"style": { "useConst": "error", "useSpreadOverApply": "error" },
"suspicious": {
"noClassAssign": "off",
"noDuplicateClassMembers": "off",
"noDuplicateObjectKeys": "off",
"noDuplicateParameters": "off",
"noFunctionAssign": "off",
"noImportAssign": "off",
"noRedeclare": "off",
"noUnsafeNegation": "off",
"noVar": "error",
"noWith": "off",
"useGetterReturn": "off"
}
}
}
}
]
}
210 changes: 33 additions & 177 deletions bun.lock

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions eslint.config.js

This file was deleted.

14 changes: 5 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"migration:cosmetics:run": "bun run src/scripts/run-cosmetics-migrations.ts",
"migration:cosmetics:revert": "bun run src/scripts/run-cosmetics-migrations.ts --revert",
"seed:cosmetics": "bun run src/scripts/seed-cosmetics.ts",
"lint": "eslint --ignore-pattern .gitignore .",
"lint:fix": "bun run lint -- --fix",
"lint": "biome lint .",
"lint:fix": "biome lint --write .",
"prepare": "if [ \"$NODE_ENV\" != \"production\" ]; then husky install; fi",
"build": "tsc"
},
Expand All @@ -31,22 +31,18 @@
"typeorm": "^0.3.28"
},
"devDependencies": {
"@biomejs/biome": "2.5.0",
"@commitlint/cli": "^20.4.1",
"@commitlint/config-conventional": "^20.4.1",
"@eslint/eslintrc": "^3.3.3",
"@eslint/js": "^9.39.2",
"@faker-js/faker": "^10.2.0",
"@types/autocannon": "^7.12.7",
"@types/jsonwebtoken": "^9.0.10",
"autocannon": "^8.0.0",
"bun-types": "^1.3.8",
"eslint": "^9.39.2",
"globals": "^16.5.0",
"husky": "^9.1.7",
"install": "^0.13.0",
"lint-staged": "^16.2.7",
"typescript": "5.9.3",
"typescript-eslint": "^8.54.0"
"typescript": "5.9.3"
},
"overrides": {
"axios": "^1.18.0",
Expand All @@ -55,6 +51,6 @@
},
"module": "src/index.js",
"lint-staged": {
"*.(js|ts)": "npm run lint:fix"
"*.{js,ts}": "biome lint --write --no-errors-on-unmatched"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export class WrappedPostgresRepository implements WrappedRepository {
);

return results.map(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// biome-ignore lint/suspicious/noExplicitAny: raw SQL query rows are untyped
(row: any) =>
new BanListStats(
row.ban_list_name,
Expand Down Expand Up @@ -334,7 +334,7 @@ export class WrappedPostgresRepository implements WrappedRepository {
[playerId, seasonId],
);

// eslint-disable-next-line @typescript-eslint/no-explicit-any
// biome-ignore lint/suspicious/noExplicitAny: raw SQL query rows are untyped
return results.map((row: any) => ({
id: row.id,
name: row.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export abstract class AbstractThemeStrategy implements IThemeStrategy {
};
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
renderSpecialSections(_data: SeasonWrapped, _options: GenerateOptions, _background: string): string {
return "";
}
Expand Down
1 change: 1 addition & 0 deletions src/shared/logger/infrastructure/Pino.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class Pino implements Logger {
},
});

// biome-ignore lint/correctness/noUnusedPrivateClassMembers: reserved for file logging, currently disabled (see commented calls in log methods)
private readonly fileLogger = pino({
level: "debug",
transport: {
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/modules/auth/application/UserAuth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ describe("UserAuth", () => {
jwt = new JWT({ issuer: "issuer", secret: "secret" });

repository = {
create: async () => { },
create: async () => undefined,
findByEmailOrUsername: async () => null,
findByEmail: async () => null,
findByUsername: async () => null,
findById: async () => null,
update: async () => { },
updateParticipantId: async () => { },
update: async () => undefined,
updateParticipantId: async () => undefined,
findByParticipantId: async () => null,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,10 @@ describe("GetCosmeticsCatalog", () => {
// Use a spy gatekeeper to count accessFor calls.
let accessForCalls = 0;
const spyGk = {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
accessFor: async (_userId: string | null) => {
accessForCalls++;
return new CosmeticAccess(CosmeticTier.REGISTERED, new Set());
},
// eslint-disable-next-line @typescript-eslint/no-unused-vars
canUse: async (_userId: string, _c: { id: string; tier: CosmeticTier }) => false,
} as unknown as EntitlementsGatekeeper;

Expand Down
Loading