Skip to content

Provide high-confidence spelling suggestions as suggestion diagnostics #41582

Closed
@DanielRosenwasser

Description

@DanielRosenwasser

When JavaScript users don't have type-checking turned on, there are often some good suggestions left on the table that go to waste.

Obviously we can't just provide all the errors that checkJs would issue, but there are a few good ones. Specifically, spelling suggestions could be provided if we were more confident in how useful they are, where confidence is determined by some rules.

Some of the following rules might be worth investigating:

  • the suggestion occurs in a module file
  • the "misspelled" identifier occurs nowhere else in the program
  • the "misspelled" identifier is not a commonly-used identifier in well-known libraries
  • the suggestion's edit distance is lower than the usual threshold

Metadata

Metadata

Assignees

Labels

Domain: JavaScriptThe issue relates to JavaScript specificallyExperimentation NeededSomeone needs to try this out to see what happensFix AvailableA PR has been opened for this issueRescheduledThis issue was previously scheduled to an earlier milestoneSuggestionAn idea for TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions