-
-
Notifications
You must be signed in to change notification settings - Fork 932
Closed
Labels
C-bugCategory - BugCategory - Buggood first issueExperience Level - Good for newcomersExperience Level - Good for newcomers
Description
Split from #5103
Command:
bunx oxlint@latest -D no-useless-promise-resolve-reject --fix src/vs/platform/languagePacks/node/languagePacks.ts
input:
fs.promises.readFile("foo", 'utf8')
.then(undefined, err => err.code === 'ENOENT' ? Promise.resolve('{}') : Promise.reject(err))output:
fs.promises.readFile("foo", 'utf8')
.then(undefined, err => throw err;)maybe expected output?
fs.promises.readFile("foo", "utf8").then(undefined, (err) => {
if (err.code === "ENOENT") {
return "{}";
} else {
throw err;
}
}); Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCategory - BugCategory - Buggood first issueExperience Level - Good for newcomersExperience Level - Good for newcomers
Type
Fields
Give feedbackPriority
None yet