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

Allow restricting classes by regexp in vue/no-restricted-class #2013

Merged
merged 3 commits into from Oct 19, 2022

Conversation

kindoflew
Copy link
Contributor

Closes #1877

This PR adds support for RegEx to the no-restricted-class rule and an update to the example in the docs.

I didn't add all the buildMatcher logic like in the example linked in the Issue (no-restricted-custom-event: https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/no-restricted-custom-event.js) because this rule seemed a little more straightforward.

Please let me know if you need anything else. Thanks!

Copy link
Member

@FloEdelmann FloEdelmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! Please see the comments below.

lib/rules/no-restricted-class.js Outdated Show resolved Hide resolved
tests/lib/rules/no-restricted-class.js Outdated Show resolved Hide resolved
@FloEdelmann FloEdelmann changed the title feature(no-restricted-class): implement support for regex Allow restricting classes by regexp in vue/no-restricted-class Oct 19, 2022
Copy link
Member

@FloEdelmann FloEdelmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thank you!

@FloEdelmann FloEdelmann merged commit 0d2607f into vuejs:master Oct 19, 2022
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

Successfully merging this pull request may close these issues.

Allow regex in vue/no-restricted-class
2 participants