diff --git a/eslint.config.js b/eslint.config.js index cd73530ad..e79d334af 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -81,8 +81,8 @@ export default [ "@typescript-eslint/prefer-includes": "error", "@typescript-eslint/prefer-literal-enum-member": "error", "@typescript-eslint/prefer-nullish-coalescing": "error", - eqeqeq: "error", - indent: "off", // @stylistic/ts/indent + "eqeqeq": "error", + "indent": "off", // @stylistic/ts/indent "sort-keys": "error", // "@typescript-eslint/no-unsafe-argument": "error", // TODO: Enable this rule, https://github.com/openfrontio/OpenFrontIO/issues/1780 // "@typescript-eslint/no-unsafe-assignment": "error", // TODO: Enable this rule, https://github.com/openfrontio/OpenFrontIO/issues/1781 @@ -90,13 +90,22 @@ export default [ // "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }], // TODO: Enable this rule, https://github.com/openfrontio/OpenFrontIO/issues/1784 "@typescript-eslint/no-unused-vars": "off", "@typescript-eslint/prefer-for-of": "error", + "array-bracket-newline": ["error", "consistent"], + "array-element-newline": ["error", "consistent"], + "arrow-parens": ["error", "always"], + "comma-dangle": ["error", "always-multiline"], + "function-call-argument-newline": ["error", "consistent"], "max-depth": ["error", { max: 5 }], // "max-len": ["error", { code: 120 }], // TODO: Enable this rule, https://github.com/openfrontio/OpenFrontIO/issues/1785 "max-lines": ["error", { max: 1065, skipBlankLines: true, skipComments: true }], "max-lines-per-function": ["error", { max: 561 }], + "object-curly-newline": ["error", { multiline: true, consistent: true }], + "object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }], "no-loss-of-precision": "error", + "no-multi-spaces": "error", // "no-undef": "error", // TODO: Enable this rule, https://github.com/openfrontio/OpenFrontIO/issues/1786 "no-unused-vars": "off", // @typescript-eslint/no-unused-vars + "quote-props": ["error", "consistent-as-needed"], // 'sort-imports': 'error', // TODO: Enable this rule, https://github.com/openfrontio/OpenFrontIO/issues/1787 "space-infix-ops": "off", }, diff --git a/src/client/Cosmetics.ts b/src/client/Cosmetics.ts index ccd5a6d6d..1d5389f57 100644 --- a/src/client/Cosmetics.ts +++ b/src/client/Cosmetics.ts @@ -41,7 +41,7 @@ export async function handlePurchase(priceId: string) { method: "POST", headers: { "Content-Type": "application/json", - authorization: getAuthHeader(), + "authorization": getAuthHeader(), }, body: JSON.stringify({ priceId: priceId, diff --git a/src/core/CustomFlag.ts b/src/core/CustomFlag.ts index 18827e599..815ff8fff 100644 --- a/src/core/CustomFlag.ts +++ b/src/core/CustomFlag.ts @@ -1,16 +1,14 @@ import { Cosmetics } from "./CosmeticSchemas"; const ANIMATION_DURATIONS: Record = { - rainbow: 4000, - /* eslint-disable sort-keys */ "bright-rainbow": 4000, "copper-glow": 3000, - "silver-glow": 3000, "gold-glow": 3000, - neon: 3000, - lava: 6000, - /* eslint-enable sort-keys */ - water: 6200, + "lava": 6000, + "neon": 3000, + "rainbow": 4000, + "silver-glow": 3000, + "water": 6200, }; // TODO: Pass in cosmetics as a parameter when diff --git a/src/server/Cloudflare.ts b/src/server/Cloudflare.ts index 197c29430..949d5f3fc 100644 --- a/src/server/Cloudflare.ts +++ b/src/server/Cloudflare.ts @@ -69,7 +69,7 @@ export class Cloudflare { const response = await fetch(url, { body: data ? JSON.stringify(data) : undefined, headers: { - Authorization: `Bearer ${this.apiToken}`, + "Authorization": `Bearer ${this.apiToken}`, "Content-Type": "application/json", }, method, @@ -184,7 +184,7 @@ export class Cloudflare { const tunnelConfig: CloudflaredConfig = { "credentials-file": this.credsPath, - ingress: [ + "ingress": [ ...Array.from(subdomainToService.entries()).map( ([subdomain, service]) => ({ hostname: `${subdomain}.${domain}`, @@ -195,7 +195,7 @@ export class Cloudflare { service: "http_status:404", }, ], - tunnel: tunnelId, + "tunnel": tunnelId, }; // Write config file