Migrate Prettier/Eslint/Stylelint setup to Biome (#1772)

* Initial

* CSS lint

* Test CI

* Add 1v1, 2v2, and 3v3 Tags (#1771)

* Initial

* CSS lint

* Test CI

* Rename step

---------

Co-authored-by: xi <104683822+ximk@users.noreply.github.com>
This commit is contained in:
Kalle
2024-06-24 13:07:17 +03:00
committed by GitHub
parent 73e9fca492
commit fd48bced91
1070 changed files with 219485 additions and 224310 deletions

View File

@@ -1,15 +1,15 @@
import Database from "better-sqlite3";
import invariant from "~/utils/invariant";
import { Kysely, ParseJSONResultsPlugin, SqliteDialect } from "kysely";
import invariant from "~/utils/invariant";
import type { DB } from "./tables";
const migratedEmptyDb = new Database("db-test.sqlite3").serialize();
invariant(process.env["DB_PATH"], "DB_PATH env variable must be set");
const isInMemoryDB = process.env["DB_PATH"] === ":memory:";
invariant(process.env.DB_PATH, "DB_PATH env variable must be set");
const isInMemoryDB = process.env.DB_PATH === ":memory:";
export const sql = new Database(
isInMemoryDB ? migratedEmptyDb : process.env["DB_PATH"],
isInMemoryDB ? migratedEmptyDb : process.env.DB_PATH,
);
sql.pragma("journal_mode = WAL");
@@ -17,16 +17,16 @@ sql.pragma("foreign_keys = ON");
sql.pragma("busy_timeout = 5000");
export const db = new Kysely<DB>({
dialect: new SqliteDialect({
database: sql,
}),
// uncomment if you want examine the queries
// log: process.env.NODE_ENV === "development" ? ["query"] : undefined,
// log(event): void {
// if (event.level === "query") {
// console.log(event.query.sql);
// console.log(event.query.parameters);
// }
// },
plugins: [new ParseJSONResultsPlugin()],
dialect: new SqliteDialect({
database: sql,
}),
// uncomment if you want examine the queries
// log: process.env.NODE_ENV === "development" ? ["query"] : undefined,
// log(event): void {
// if (event.level === "query") {
// console.log(event.query.sql);
// console.log(event.query.parameters);
// }
// },
plugins: [new ParseJSONResultsPlugin()],
});