chore: replace eslint & prettier w/ biomejs (#21)
* chore: replace eslint & prettier w/ biomejs * fix syntax error in ci.yml workflow * ensure that build CI jobs only run if check job succeeds to save resources
This commit is contained in:
parent
73135dd4b5
commit
5118a8174b
44 changed files with 2408 additions and 5691 deletions
|
|
@ -3,28 +3,28 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
import * as fs from "fs";
|
||||
import * as path from "path";
|
||||
import * as fs from "node:fs";
|
||||
import * as path from "node:path";
|
||||
|
||||
const ROOT_DIR = path.resolve(__dirname, "..");
|
||||
const DIST_DIR = path.join(ROOT_DIR, "dist");
|
||||
const TEST_DIR = path.join(ROOT_DIR, ".temp");
|
||||
|
||||
const rmdirRecursive = (dirPath: string): void => {
|
||||
if (!fs.existsSync(dirPath)) {
|
||||
return;
|
||||
}
|
||||
const entryNames = fs.readdirSync(dirPath);
|
||||
for (const entryName of entryNames) {
|
||||
const entryPath = path.join(dirPath, entryName);
|
||||
const dirent = fs.lstatSync(entryPath);
|
||||
if (dirent.isDirectory()) {
|
||||
rmdirRecursive(entryPath);
|
||||
} else {
|
||||
fs.unlinkSync(entryPath);
|
||||
}
|
||||
}
|
||||
fs.rmdirSync(dirPath);
|
||||
if (!fs.existsSync(dirPath)) {
|
||||
return;
|
||||
}
|
||||
const entryNames = fs.readdirSync(dirPath);
|
||||
for (const entryName of entryNames) {
|
||||
const entryPath = path.join(dirPath, entryName);
|
||||
const dirent = fs.lstatSync(entryPath);
|
||||
if (dirent.isDirectory()) {
|
||||
rmdirRecursive(entryPath);
|
||||
} else {
|
||||
fs.unlinkSync(entryPath);
|
||||
}
|
||||
}
|
||||
fs.rmdirSync(dirPath);
|
||||
};
|
||||
|
||||
rmdirRecursive(DIST_DIR);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue