Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Bug]: Cspell is reading HTML classes #4543

Open
2 tasks done
aakashgill opened this issue Jun 9, 2023 · 1 comment
Open
2 tasks done

[Bug]: Cspell is reading HTML classes #4543

aakashgill opened this issue Jun 9, 2023 · 1 comment

Comments

@aakashgill
Copy link

Hi

I tried this tool and it worked well. It's able to scan the code and giving errors if any incorrect spelling was there.
But I'm not sure if it's supposed to read the class attribute or not inside HTML.

  • runtime - command-line tools

Tool I've used to check spellings

  • cspell -- the command-line spelling tool

Version: 6.31.1
OS: Macos Monterey
Version: 12.5.1

Bug Description

I'm getting errors in the class names that some of the spellings are incorrect. Since I use ACSS for class names, all the names are utility-first classes and not an actual word.

Steps to reproduce the behavior:

  1. yarn add cspell
  2. I cspell task in package.json "cspell": "cspell 'newhome.php'"
  3. yarn run cspell
  4. See error in screenshot below
    image
    image

Expected behavior

To avoid reading the class or ID attribute in HTML so that I don't manually have to restrict some utility-classes.

@Jason3S
Copy link
Collaborator

Jason3S commented Jun 19, 2023

@aakashgill,

By design, the spell checker checks the entire file. It is possible to use a regular expression to tell the spell check to skip things, ignoreRegExpList.

My suggestion would be to create a custom dictionary to contains your class names, instead of trying to ignore them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants