microsoft / microsoft/TypeScript
Document quick fix (or whatever it's officially called)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
TypeScript Version: 3.3.0-dev.201xxxxx
Search Terms:
code fix
quick fix
suggestion
Code
not entirely applicable, but this is what I had which caused me to get confused
const fs = require("fs");
Expected behavior:
Commandline tsc should behave the same as editor integrations
Actual behavior:
The "quick fix" feature, which appears to be called "code fixes" in the codebase and googling the messages led me to the json file which refers to them as "suggestions", only appears to exist in the typescript server.
As a newcomer this had me extremely confused. I was running tsc on the commandline and getting no errors, but seeing squiggly lines and messages in my editor (atom, in this case).
I was unable to find any documentation about where the message 'require' call may be converted to an import was coming from, or that this was a hint that typescript was able to fix my code for me.
It would also be helpful if the tsc client was able to list the code fix suggestions, even if giving it a way to apply them would be too complex.
Playground Link:
n/a
Related Issues:
none that I could find
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 by comparing the command-line tsc behavior with the TypeScript server and editor integrations described in the issue. Trace the code-fix terminology in the TypeScript codebase and its message JSON, then determine whether documentation alone covers the gap or whether listing suggestions in tsc is also required; done means the terminology and supported behavior are clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli, documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100