Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Ignore words containing special characters #61

Open
politician opened this issue Jul 8, 2020 · 1 comment
Open

Ignore words containing special characters #61

politician opened this issue Jul 8, 2020 · 1 comment

Comments

@politician
Copy link

Spellcheck should ignore all words containing special characters.
Except when:

  • the word's only special character is a punctuation mark at the end followed by a space (eg. Hello. World
  • the word's only special characters are parenthesis at the beginning or the end
  • ???

Examples:

  • Hello. world pass 2/2 words
  • Helo. world fail 1/2 words
  • Helo.world pass 1/1 word
  • (Hello) world pass 2/2 words
  • (Helo) world fail 1/2 words
  • (Hello world) pass 2/2 words
  • (Helo world) fail 1/2 words
  • H(e)lo world pass 1/1 word
  • He/lo/world pass 1/1 word

Current false positives example

example.js

// Edit .eslintrc.json
let myVar = '**/tests/**/*.[jt]s'
myVar = '@rollup/plugin-alias'
myVar = 'babel-preset-minify'
myVar = '.tsx'
myVar = 'myfile.json'

spellcheck output

  1:1   warning  You have a misspelled word: eslintrc on Comment  spellcheck/spell-checker
  2:13  warning  You have a misspelled word: jt on String         spellcheck/spell-checker
  3:9   warning  You have a misspelled word: rollup on String     spellcheck/spell-checker
  4:9   warning  You have a misspelled word: minify on String     spellcheck/spell-checker
  5:9   warning  You have a misspelled word: tsx on String        spellcheck/spell-checker
  6:9   warning  You have a misspelled word: myfile on String     spellcheck/spell-checker
@aotaduy
Copy link
Owner

aotaduy commented Jul 15, 2020

Hi !

right now we are spellchecking each word and using the special char as a separator. I belive this is a correct behaviour so we are able to check things like class selectors, I dont think is a good idea ti just ignore a word for a special character,

maybe we can treat this special words as skip words or with some other mechanism.

Thanks for the issue anyway i will try to figure out a solution for this one.
We are adding some js words as rollup, tsx and others to our dictionary maybe that is a better solution so we can keep checking ids and other words embedded into ids separators and variable names (snake case, camel case, hyphen, etc) .

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants