Skip to content

Commit 47dbdcb

Browse files
committed
fix(ci): resolve precheck lint failures
1 parent 9b333c2 commit 47dbdcb

4 files changed

Lines changed: 24 additions & 25 deletions

File tree

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.3.14/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.4.11/schema.json",
33
"vcs": {
44
"enabled": true,
55
"clientKind": "git",

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@
129129
"top": 10
130130
},
131131
"simple-git-hooks": {
132-
"pre-commit": "pnpm lint && pnpm lint-staged && pnpm typecheck"
132+
"pre-commit": "pnpm lint && pnpm lint-staged && pnpm typecheck",
133+
"pre-push": "pnpm lint"
133134
},
134135
"lint-staged": {
135136
"*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [

src/commands/sync.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ const createJobRunner = (params: {
788788
let index = 0;
789789
const runNext = async () => {
790790
const job = jobs[index];
791-
if (!job || !job.source) {
791+
if (!job?.source) {
792792
return;
793793
}
794794
index += 1;

tests/targets.test.js

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -46,28 +46,26 @@ test("applyTargetDir warns and falls back to copy when symlink fails", async ()
4646
assert.match(stderr, /Warning: Failed to create symlink/i);
4747
});
4848

49-
test(
50-
"applyTargetDir uses relative symlink targets on non-Windows",
51-
{ skip: process.platform === "win32" },
52-
async () => {
53-
const tmpRoot = path.join(
54-
tmpdir(),
55-
`docs-cache-target-relative-${Date.now().toString(36)}`,
56-
);
57-
const sourceDir = path.join(tmpRoot, "source");
58-
const targetDir = path.join(tmpRoot, "target");
59-
const parentDir = path.dirname(targetDir);
49+
test("applyTargetDir uses relative symlink targets on non-Windows", {
50+
skip: process.platform === "win32",
51+
}, async () => {
52+
const tmpRoot = path.join(
53+
tmpdir(),
54+
`docs-cache-target-relative-${Date.now().toString(36)}`,
55+
);
56+
const sourceDir = path.join(tmpRoot, "source");
57+
const targetDir = path.join(tmpRoot, "target");
58+
const parentDir = path.dirname(targetDir);
6059

61-
await mkdir(sourceDir, { recursive: true });
62-
await writeFile(path.join(sourceDir, "README.md"), "hello", "utf8");
60+
await mkdir(sourceDir, { recursive: true });
61+
await writeFile(path.join(sourceDir, "README.md"), "hello", "utf8");
6362

64-
await applyTargetDir({
65-
sourceDir,
66-
targetDir,
67-
mode: "symlink",
68-
});
63+
await applyTargetDir({
64+
sourceDir,
65+
targetDir,
66+
mode: "symlink",
67+
});
6968

70-
const linkTarget = await readlink(targetDir);
71-
assert.equal(linkTarget, path.relative(parentDir, sourceDir));
72-
},
73-
);
69+
const linkTarget = await readlink(targetDir);
70+
assert.equal(linkTarget, path.relative(parentDir, sourceDir));
71+
});

0 commit comments

Comments
 (0)