- 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.
14 lines
376 B
JavaScript
14 lines
376 B
JavaScript
// 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(),
|
|
extname: (p) => {
|
|
const parts = p.split(".");
|
|
return parts.length > 1 ? "." + parts.pop() : "";
|
|
},
|
|
};
|
|
|
|
export default path;
|