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

Add RuboCop::Cop::Primer::TestSelector to encourage use of the test_selector argument #1768

Merged
merged 11 commits into from
Jan 23, 2023

Conversation

jdennes
Copy link
Member

@jdennes jdennes commented Jan 23, 2023

Description

This branch adds RuboCop::Cop::Primer::TestSelector, which aims to prevent people doing this:

Primer::BaseComponent.new(data: { "test-selector": "the-component" })

And instead encourage this:

Primer::BaseComponent.new(test_selector: "the-component")

Integration

Does this change require any updates to code in production?

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews

@jdennes jdennes requested review from a team and jonrohan January 23, 2023 07:24
@changeset-bot
Copy link

changeset-bot bot commented Jan 23, 2023

🦋 Changeset detected

Latest commit: 5925849

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/view-components Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@camertron camertron left a comment

Choose a reason for hiding this comment

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

Nice, thanks! 🎉

@jonrohan
Copy link
Member

I guess the changeset checker doesn't work well with forks. I'll admin merge this

@camertron
Copy link
Contributor

@jonrohan oh man I didn't think about that 😬

@jonrohan jonrohan merged commit fe8e707 into primer:main Jan 23, 2023
@primer-css primer-css mentioned this pull request Jan 23, 2023
@jdennes jdennes deleted the jdennes/test-selector branch January 23, 2023 21:53
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.

3 participants