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

How to ignore UUIDs #96

Open
relm923 opened this issue Mar 15, 2024 · 5 comments
Open

How to ignore UUIDs #96

relm923 opened this issue Mar 15, 2024 · 5 comments

Comments

@relm923
Copy link

relm923 commented Mar 15, 2024

Would like to add skip rule to ignore all UUIDs (ex: 10fa9e30-95ce-4bb6-844b-e68445bf2d63)

Have tried:

{
  "skipIfMatch": "^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$"
}

but still get errors:

You have a misspelled word: 95ce on String eslint(spellcheck/spell-checker)
You have a misspelled word: 4bb6 on String eslint(spellcheck/spell-checker)
@aotaduy
Copy link
Owner

aotaduy commented Mar 15, 2024

Please try removing start ^ and $ end of line to the regexp

@relm923
Copy link
Author

relm923 commented Mar 15, 2024

@aotaduy same result

@aotaduy
Copy link
Owner

aotaduy commented Mar 15, 2024

mmm looks like uuid is treated as different strings.
can you provide a code fragment so I can create a unit test and solve the issue?
Have you tried with skipWordIfMatch ?

@relm923
Copy link
Author

relm923 commented Mar 15, 2024

const UUID = '10fa9e30-95ce-4bb6-844b-e68445bf2d63';
    'spellcheck/spell-checker': [
      2,
      {
        skipWordIfMatch: [
          '[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}]'
        ],
        skipIfMatch: [
          '[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}]'
        ],
      },
    ],

@relm923
Copy link
Author

relm923 commented Aug 22, 2024

@aotaduy any luck here?

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

No branches or pull requests

2 participants