eslint-plugin-spellcheck
eslint-plugin-spellcheck copied to clipboard
How to ignore "IPv4" in comments
This code:
// IPv4
… produces this warning:
You have a misspelled word: Pv4 on Comment
… even with following config:
{
skipWords: [/*…*/],
minLength: 3,
skipIfMatch: ["^IPv[46]$"],
}
What am I understanding wrong here and how to accept "IPv6" / "IPv4"?
Thanks in advance
There's a note in the readme for skipping words that end in a number. Short answer is skipWords: ["IPv"]
.
Thanks, but that does not work. What works is skipWords: ["pv"]
. skipWords: ["ipv"]
does also not work.
I wonder why "pv" is even spell-checked because minLength: 3
.
Another solution which seems to work is to remove the anchors from the regex, i.e.: skipIfMatch: "IPv[46]"
. That behavior seems hard to understand because the example in the README also uses the regex anchors ^
and $
.