Skip to content

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.

@kindoflew kindoflew requested a review from FloEdelmann October 19, 2022 17:20
@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