fix: eslint unused error

This commit is contained in:
wancat committed 2024-04-05 22:22:44 +08:00
1 parent 455fde41ab
commit 27b6096633
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@ const api = axios.create({
async function readOrNone(file) { async function readOrNone(file) {
try { try {
return await fs.readFile(file, 'utf8') return await fs.readFile(file, 'utf8')
} catch (err) { } catch (_) {
return '' return ''
} }
} }
+2 -2
View File
@@ -25,7 +25,7 @@ async function collectFilesInfo(inputPath, level = 0, hiddenFiles = false) {
) )
) )
files.push(...result.flat()) files.push(...result.flat())
} catch (err) { } catch (_) {
// ignore // ignore
} }
} }
@@ -41,7 +41,7 @@ async function discoverFiles(argv) {
.map((p) => collectFilesInfo(p, 0, argv.a || argv.all)) .map((p) => collectFilesInfo(p, 0, argv.a || argv.all))
) )
return { discover: result.flat() } return { discover: result.flat() }
} catch (err) { } catch (_) {
return {} return {}
} }
} }