Skip to content

Commit

Permalink
fix: biome linter issues (#5695)
Browse files Browse the repository at this point in the history
  • Loading branch information
BatuhanW authored Feb 28, 2024
1 parent 1fc63e4 commit 79865af
Show file tree
Hide file tree
Showing 494 changed files with 1,965 additions and 2,303 deletions.
7 changes: 7 additions & 0 deletions .biome/todos
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@ Checked 6952 file(s) in 580ms
The number of diagnostics exceeds the number allowed by Biome.
Diagnostics not shown: 5291.
Checked 6952 file(s) in 572ms

> [email protected] biome
> biome lint .

The number of diagnostics exceeds the number allowed by Biome.
Diagnostics not shown: 4136.
Checked 6952 file(s) in 545ms
36 changes: 36 additions & 0 deletions .changeset/ten-parrots-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
"@refinedev/ably": patch
"@refinedev/antd": patch
"@refinedev/appwrite": patch
"@refinedev/chakra-ui": patch
"@refinedev/cli": patch
"@refinedev/codemod": patch
"@refinedev/core": patch
"create-refine-app": patch
"@refinedev/devtools": patch
"@refinedev/devtools-internal": patch
"@refinedev/devtools-server": patch
"@refinedev/devtools-shared": patch
"@refinedev/devtools-ui": patch
"@refinedev/graphql": patch
"@refinedev/hasura": patch
"@refinedev/inferencer": patch
"@refinedev/kbar": patch
"@refinedev/live-previews": patch
"@refinedev/mantine": patch
"@refinedev/mui": patch
"@refinedev/nestjs-query": patch
"@refinedev/nestjsx-crud": patch
"@refinedev/nextjs-router": patch
"@refinedev/react-hook-form": patch
"@refinedev/react-router-v6": patch
"@refinedev/react-table": patch
"@refinedev/remix-router": patch
"@refinedev/simple-rest": patch
"@refinedev/strapi": patch
"@refinedev/strapi-v4": patch
"@refinedev/supabase": patch
"@refinedev/ui-tests": patch
---

chore: apply biome format and fix lint errors.
9 changes: 5 additions & 4 deletions .github/workflows/build-example-chunks.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,15 @@ const examples = getExamples().filter((dir) =>
);

console.log(
`Changed packages (${changedPackages.length}):\n- ` +
changedPackages.join("\n- "),
`Changed packages (${changedPackages.length}):\n- ${changedPackages.join(
"\n- ",
)}`,
);

console.log("");

console.log(
`Affected examples (${examples.length}):\n- ` + examples.join("\n- "),
`Affected examples (${examples.length}):\n- ${examples.join("\n- ")}`,
);

//
Expand Down Expand Up @@ -148,5 +149,5 @@ for (let i = 0; i < examples.length; i += chunkSize) {
// Set outputs
//
chunks.forEach((chunk, i) => {
console.log("::set-output name=CHUNK_" + (i + 1) + "::" + chunk.join(","));
console.log(`::set-output name=CHUNK_${i + 1}::${chunk.join(",")}`);
});
48 changes: 24 additions & 24 deletions .github/workflows/e2e-examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const getProjectInfo = async (path) => {
const devDependencies = Object.keys(packageJson.devDependencies || {});

let port = 3000;
let command = `npm run dev`;
let command = "npm run dev";
let additionalParams = "";

// check for vite
Expand Down Expand Up @@ -114,25 +114,24 @@ const getProjectsWithE2E = async () => {
).filter(Boolean);
};

const waitOnFor = (resource) => {
return new Promise(async (resolve, reject) => {
try {
await waitOn({
resources: [resource],
log: true,
});
const waitOnFor = async (resource) => {
try {
await waitOn({
resources: [resource],
log: true,
});

resolve(resource);
} catch (error) {
if (error) console.log(error);
return resource;
} catch (error) {
if (error) console.log(error);

resolve(false);
}
});
return false;
}
};

const waitForServer = async (port) => {
return new Promise(async (resolve, reject) => {
// biome-ignore lint/suspicious/noAsyncPromiseExecutor: We have a valid use-case here.
return new Promise(async (resolve) => {
setTimeout(() => {
resolve(false);
}, 120000);
Expand All @@ -154,7 +153,8 @@ const waitForServer = async (port) => {
};

const waitForClose = (resource) => {
return new Promise(async (resolve, reject) => {
// biome-ignore lint/suspicious/noAsyncPromiseExecutor: We have a valid use-case here.
return new Promise(async (resolve) => {
setTimeout(() => {
resolve(false);
}, 120000);
Expand Down Expand Up @@ -200,7 +200,7 @@ const runTests = async () => {

prettyLog("blue", `Running for ${path} at port ${port}`);

prettyLog("blue", `Starting the dev server`);
prettyLog("blue", "Starting the dev server");

let start;

Expand All @@ -215,7 +215,7 @@ const runTests = async () => {
start.stdout.on("data", console.log);
start.stderr.on("data", console.error);
} catch (error) {
prettyLog("red", `Error occured on starting the dev server`);
prettyLog("red", "Error occured on starting the dev server");
failed = true;
}

Expand All @@ -226,14 +226,14 @@ const runTests = async () => {

const status = await waitForServer(port);
if (!status) {
prettyLog("red", `Error occured on waiting for the server to start`);
prettyLog("red", "Error occured on waiting for the server to start");
failed = true;
} else {
respondedUrl = status;
prettyLog("green", `Server started at ${status}`);
}
} catch (error) {
prettyLog("red", `Error occured on waiting for the server to start`);
prettyLog("red", "Error occured on waiting for the server to start");
if (error) console.log(error);

failed = true;
Expand All @@ -258,7 +258,7 @@ const runTests = async () => {

failed = true;
} finally {
prettyLog("blue", `Killing the dev server`);
prettyLog("blue", "Killing the dev server");

try {
if (start.pid) {
Expand All @@ -272,12 +272,12 @@ const runTests = async () => {

await waitForClose(respondedUrl);

prettyLog("green", `Killed the dev server`);
prettyLog("green", "Killed the dev server");
} else {
failed = true;
}
} catch (error) {
prettyLog("red", `Error occured on killing the dev server`);
prettyLog("red", "Error occured on killing the dev server");
if (error) console.log(error);
failed = true;
}
Expand All @@ -290,7 +290,7 @@ const runTests = async () => {
prettyLog("red", `Tests for ${path} failed.`);
}

console.log(`::endgroup::`);
console.log("::endgroup::");
}

if (failedExamples.length > 0) {
Expand Down
56 changes: 0 additions & 56 deletions .github/workflows/push.yml

This file was deleted.

13 changes: 12 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
{
"editor.defaultFormatter": "biomejs.biome",
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
44 changes: 0 additions & 44 deletions biome-reporter.js

This file was deleted.

Loading

0 comments on commit 79865af

Please sign in to comment.