microsoft / microsoft/monaco-editor
[Bug] Repeated Quick Fixes
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
Reproducible in vscode.dev or in VS Code Desktop?
- Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
- Not reproducible in the monaco editor playground
Monaco Editor Playground Link
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:
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Monaco Editor Playground and the TypeScript code shown in the issue. Reproduce the unreachable-code warning, hover it, and open “Quick Fix...” to inspect the repeated actions. Done means “Ignore this error message” and “Disable checking for this file” each appear only once.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100