Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Repeated Quick Fixes #4577

Open
1 of 2 tasks
micahg opened this issue Jun 25, 2024 · 0 comments
Open
1 of 2 tasks

[Bug] Repeated Quick Fixes #4577

micahg opened this issue Jun 25, 2024 · 0 comments

Comments

@micahg
Copy link

micahg commented Jun 25, 2024

Reproducible in vscode.dev or in VS Code Desktop?

  • Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Link

https://microsoft.github.io/monaco-editor/playground.html?source=v0.50.0#XQAAAAIWAgAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscw0fINSAEiAKctgAboa7AaZZDHLgrLqPRv_fRv2RyIokydlTdTYccsu6v6jDrc8jQ8ulrCVzjWBVWZVl-YrARXWjHEENNCrQ2qKhRtPpGiVCLaF6X2KlhMzX85uAfntats9JnRhU1YrXtzHc0TsF8K9lOFiGXCcg8ECAIWYz4JECTeKHJFAUolkK_9nTl9EDKklIypZPHFbxiXSPY5AKW5Q_7js42fH5HC1v7w82HAB4rgeC_7qn0mJuce9AfcucC_sBZpbdaMQ4fwveYX8uzVB-PewBNcspiR1a8cW1ktAvXYT5HFsxM8r-aY2qAbhMNWCj2t0dQZKzy0yVLQw30IUcAt5892hkXjyRsDUaNW6DeBa243ts9KgM2ulIGqWx4OvWKcfd8kMdhxFd8aIBc_gojzVW76frfnS1TRUGhmRtsQevdV_y1bWQA

Monaco Editor Playground Code

const value = /* set from `myEditor.getModel()`: */ `function hello() {
	// let x = null;// uncomment this line === problem goes away
	return;
	x; 
}`;

monaco.languages.typescript.typescriptDefaults.setCompilerOptions({
	allowJs: true,
	allowNonTsExtensions: true,
	allowUnreachableCode: false,
	checkJs: true,
})


// Hover on each property to see its docs!
const myEditor = monaco.editor.create(document.getElementById("container"), {
	value,
	language: "typescript",
});

Reproduction Steps

  • Hover over quick highlighted error on line 4
  • Select "Quick Fix..."
  • Observe repeated fixes:
    image

Actual (Problematic) Behavior

The "Ignore this error message" and "Disable checking for this file" quick fixes are repeated.

Expected Behavior

The "Ignore this error message" and "Disable checking for this file" quick fixes are not repeated.

Additional Context

The unreachable code must contain an undefined reference -- if the ref after the return is defined, the problem goes away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant