fix: move lexical declarations outside case blocks in AbsurdSqlDatabaseService

- Move queryResult and allResult declarations outside switch statement
- Change const declarations to let since they're now in outer scope
- Remove const declarations from inside case blocks

This fixes the 'no-case-declarations' linter errors by ensuring variables
are declared in a scope that encompasses all case blocks, preventing
potential scoping issues.

Note: Type definition errors for external modules remain and should be
addressed separately.
This commit is contained in:
Matthew Raymer
2025-05-27 03:14:02 +00:00
parent 3c0bdeaed3
commit 0f1ac2b230
17 changed files with 2849 additions and 536 deletions

View File

@@ -1,2 +1,2 @@
// Empty module to satisfy Node.js built-in module imports
export default {};
export default {};

View File

@@ -9,9 +9,9 @@ const crypto = {
},
createHash: () => ({
update: () => ({
digest: () => new Uint8Array(32) // Return empty hash
})
})
digest: () => new Uint8Array(32), // Return empty hash
}),
}),
};
export default crypto;
export default crypto;

View File

@@ -1,18 +1,18 @@
// Minimal fs module implementation for browser
const fs = {
readFileSync: () => {
throw new Error('fs.readFileSync is not supported in browser');
throw new Error("fs.readFileSync is not supported in browser");
},
writeFileSync: () => {
throw new Error('fs.writeFileSync is not supported in browser');
throw new Error("fs.writeFileSync is not supported in browser");
},
existsSync: () => false,
mkdirSync: () => {},
readdirSync: () => [],
statSync: () => ({
isDirectory: () => false,
isFile: () => false
})
isFile: () => false,
}),
};
export default fs;
export default fs;

View File

@@ -1,13 +1,13 @@
// Minimal path module implementation for browser
const path = {
resolve: (...parts) => parts.join('/'),
join: (...parts) => parts.join('/'),
dirname: (p) => p.split('/').slice(0, -1).join('/'),
basename: (p) => p.split('/').pop(),
resolve: (...parts) => parts.join("/"),
join: (...parts) => parts.join("/"),
dirname: (p) => p.split("/").slice(0, -1).join("/"),
basename: (p) => p.split("/").pop(),
extname: (p) => {
const parts = p.split('.');
return parts.length > 1 ? '.' + parts.pop() : '';
}
const parts = p.split(".");
return parts.length > 1 ? "." + parts.pop() : "";
},
};
export default path;
export default path;