eslint-plugin-spellcheck icon indicating copy to clipboard operation
eslint-plugin-spellcheck copied to clipboard

Confusion over skipWordIfMatch

Open charliematters opened this issue 3 years ago • 0 comments

Hi,

I want to be told that I have a spelling error in this comment:

// Some of the IDs have speling errors

For the sake of argument, I don't want it to complain about "IDs", so I add a rule to skipWordIfMatch:

skipWordIfMatch: ["^IDs$"]

The documentation says "the plugin will try to match every single word that is found in the nodes (...) and will not check the single word if matched." So I'd assume that because "IDs" matches /^IDs$/ it will not check that word. Instead I get:

You have a misspelled word: Ds on Comment

How do I exclude certain exact matches from the spell check without putting them in "skipIfMatch" (which means my other spelling error gets missed)?

charliematters avatar Sep 28 '21 12:09 charliematters