Browse Source
- 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.pull/137/head
17 changed files with 2850 additions and 537 deletions
File diff suppressed because it is too large
@ -1,18 +1,18 @@ |
|||||
// Minimal fs module implementation for browser
|
// Minimal fs module implementation for browser
|
||||
const fs = { |
const fs = { |
||||
readFileSync: () => { |
readFileSync: () => { |
||||
throw new Error('fs.readFileSync is not supported in browser'); |
throw new Error("fs.readFileSync is not supported in browser"); |
||||
}, |
}, |
||||
writeFileSync: () => { |
writeFileSync: () => { |
||||
throw new Error('fs.writeFileSync is not supported in browser'); |
throw new Error("fs.writeFileSync is not supported in browser"); |
||||
}, |
}, |
||||
existsSync: () => false, |
existsSync: () => false, |
||||
mkdirSync: () => {}, |
mkdirSync: () => {}, |
||||
readdirSync: () => [], |
readdirSync: () => [], |
||||
statSync: () => ({ |
statSync: () => ({ |
||||
isDirectory: () => false, |
isDirectory: () => false, |
||||
isFile: () => false |
isFile: () => false, |
||||
}) |
}), |
||||
}; |
}; |
||||
|
|
||||
export default fs; |
export default fs; |
@ -1,13 +1,13 @@ |
|||||
// Minimal path module implementation for browser
|
// Minimal path module implementation for browser
|
||||
const path = { |
const path = { |
||||
resolve: (...parts) => parts.join('/'), |
resolve: (...parts) => parts.join("/"), |
||||
join: (...parts) => parts.join('/'), |
join: (...parts) => parts.join("/"), |
||||
dirname: (p) => p.split('/').slice(0, -1).join('/'), |
dirname: (p) => p.split("/").slice(0, -1).join("/"), |
||||
basename: (p) => p.split('/').pop(), |
basename: (p) => p.split("/").pop(), |
||||
extname: (p) => { |
extname: (p) => { |
||||
const parts = p.split('.'); |
const parts = p.split("."); |
||||
return parts.length > 1 ? '.' + parts.pop() : ''; |
return parts.length > 1 ? "." + parts.pop() : ""; |
||||
} |
}, |
||||
}; |
}; |
||||
|
|
||||
export default path; |
export default path; |
Loading…
Reference in new issue