PR: Mispelling inferences
See original GitHub issueWould a PR for something like this be welcome:
// Simple example of making inferences through spelling
const some = Promis // <- misspelled Promise
When linting this code, eslint would output something like so:
Unexpected token 'Promis'. Did you mean 'Promise'?
instead of:
Parsing Error: Unexpected token.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:13 (8 by maintainers)
Top Results From Across the Web
Misspelling Correction with Pre-trained Contextual Language ...
As humans, we are able to understand most of the misspelled words based on their location in the sentence, perceived pronunciation, and context....
Read more >10 Words Often Misspelled in Business Correspondence
For me, double letters are the most vexing: omission vs ommission, occurrence vs occurence, and pairs like refer/reference/referring, infer/inference/inferring, ...
Read more >Spelling Correction and the Noisy Channel
Luckily, we can get a pretty reasonable estimate of P(x|w) just by looking at local context: the identity of the correct letter itself,...
Read more >SPELLING ERRORS ACROSS LANGUAGES - OSF
In each language, we select a set of correctly spelled words and their non-standard spelling variants. The words are selected to have a...
Read more >IV. College Students' Misspelling of Common Words - jstor
we shall never develop adequate reading pro- ... List of words, each misspelled by more than 300 college students (1931-1955) ... inferences more...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In that case,
no-undef
already notifies you about usage of undefined variables. What’s the advantage of us guessing what you might’ve meant if the rule already points you to the location of the wrong variable? Chances are, we can’t really guess correctly what was supposed to be there in the first place. User would know much better what he was planning to type there. I don’t see this is useful enough to justify complexity that this would add to one of the most widely used rules out there. Overall I’m 👎 on this, sorry.I’m not sure I understand why the example would give a parse error. Are you using ecmaVersion: 6 or later?
The no-undef rule should already flag this sort of thing.