chore: fix Biome lint warnings (non-null assertions, unused param)

This commit is contained in:
Giancarlo Erra
2026-04-16 18:31:44 +01:00
parent af7d1d4d45
commit 2fdbaf8ba4
2 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ const MAX_EXTENDS_DEPTH = 10;
*/
async function followExtendsChain(
configPath: string,
projectPath: string,
_projectPath: string,
): Promise<PathAliases> {
const visited = new Set<string>();
let currentPath = configPath;
+6 -4
View File
@@ -207,11 +207,12 @@ describe("loadConfig", () => {
try {
const config = await loadConfig(projectDir);
expect(config).not.toBeNull();
const artifacts = config?.artifacts ?? [];
// Relative path should be resolved against globalDir, not projectDir
expect(path.isAbsolute(config!.artifacts![0].path)).toBe(true);
expect(config!.artifacts![0].path).toBe(path.resolve(globalDir, "docs/schema.sql"));
expect(path.isAbsolute(artifacts[0].path)).toBe(true);
expect(artifacts[0].path).toBe(path.resolve(globalDir, "docs/schema.sql"));
// Absolute path should remain unchanged
expect(config!.artifacts![1].path).toBe("/absolute/path/schema.sql");
expect(artifacts[1].path).toBe("/absolute/path/schema.sql");
} finally {
if (originalEnv === undefined) {
delete process.env.SOCRATICODE_GLOBAL_CONFIG_DIR;
@@ -231,8 +232,9 @@ describe("loadConfig", () => {
});
const config = await loadConfig(projectDir);
expect(config).not.toBeNull();
const artifacts = config?.artifacts ?? [];
// Project-level config should keep relative paths as-is (resolved downstream)
expect(config!.artifacts![0].path).toBe("./schema.sql");
expect(artifacts[0].path).toBe("./schema.sql");
});
it("prefers project-level config over global config", async () => {