Skip to content

bug(linter) bug in fixer for no-useless-promise-resolve-reject #5126

@camc314

Description

@camc314

it's fixed to invalid JS code.

bunx oxlint@latest -D no-useless-promise-resolve-reject <path to file>
let output = [];

async function foo() {
	Promise.resolve().then(() => output.push('--end microtask--'));
}

fixed:

let output = [];

async function foo() {
	.then(() => output.push('--end microtask--'));
}

maybe expected fix?

let output = [];

async function foo() {
    return output.push('--end microtask--')
}

Metadata

Metadata

Assignees

Labels

C-bugCategory - Buggood first issueExperience Level - Good for newcomers

Type

No type

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions