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,38 +1,37 @@
import fs from "node:fs";
import path from "path";
import { fileURLToPath } from "url";
import { fileURLToPath } from "node:url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
import path from "node:path";
function main() {
const dbProdPath = path.join(__dirname, "..", "db-prod.sqlite3");
const dbProdShmPath = path.join(__dirname, "..", "db-prod.sqlite3-shm");
const dbProdWalPath = path.join(__dirname, "..", "db-prod.sqlite3-wal");
const dbCopyPath = path.join(__dirname, "..", "db-copy.sqlite3");
const dbProdPath = path.join(__dirname, "..", "db-prod.sqlite3");
const dbProdShmPath = path.join(__dirname, "..", "db-prod.sqlite3-shm");
const dbProdWalPath = path.join(__dirname, "..", "db-prod.sqlite3-wal");
const dbCopyPath = path.join(__dirname, "..", "db-copy.sqlite3");
if (!fs.existsSync(dbCopyPath)) {
console.error(`File ${dbCopyPath} does not exist`);
process.exit(1);
}
if (!fs.existsSync(dbCopyPath)) {
console.error(`File ${dbCopyPath} does not exist`);
process.exit(1);
}
// delete db-prod.sqlite3-shm file if exists
if (fs.existsSync(dbProdShmPath)) {
fs.unlinkSync(dbProdShmPath);
}
// delete db-prod.sqlite3-shm file if exists
if (fs.existsSync(dbProdShmPath)) {
fs.unlinkSync(dbProdShmPath);
}
// delete db-prod.sqlite3-wal file if exists
if (fs.existsSync(dbProdWalPath)) {
fs.unlinkSync(dbProdWalPath);
}
// delete db-prod.sqlite3-wal file if exists
if (fs.existsSync(dbProdWalPath)) {
fs.unlinkSync(dbProdWalPath);
}
// delete db-prod.sqlite3 if exists
if (fs.existsSync(dbProdPath)) {
fs.unlinkSync(dbProdPath);
}
// delete db-prod.sqlite3 if exists
if (fs.existsSync(dbProdPath)) {
fs.unlinkSync(dbProdPath);
}
// copy db-copy.sqlite3 to db-prod.sqlite3
fs.copyFileSync(dbCopyPath, dbProdPath);
// copy db-copy.sqlite3 to db-prod.sqlite3
fs.copyFileSync(dbCopyPath, dbProdPath);
}
main();