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

prevent-abbreviations: Smarter whitelist option possibly deprecating ignore option #930

Open
futpib opened this issue Dec 9, 2020 · 0 comments

Comments

@futpib
Copy link
Contributor

futpib commented Dec 9, 2020

There are now two options to exclude an identifier from linting: older whitelist and newer ignore. I think whitelist alone would suffice with the following modification.

We could make whitelist match any subsequence of the split identifier. For example (following up this #567 (comment)):
For fooE2eBar all of these would be checked against whitelist:

  • foo
  • e
  • 2
  • bar
  • barE
  • e2
  • 2e
  • eBar
  • fooE2
  • e2e
  • 2eBar
  • fooE2e
  • e2eBar
  • fooE2eBar

And if any of them is in the whitelist that subsequence is ignored.

But in my opinion it should not ignore the whole identifier if only subsequence matches whitelist.

For example, if the user had e2e in their whitelist, e2eErr should still be fixed to e2eError.

From #891 (comment)

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