Skip to content

Lint view component best practices - #142

Merged
koppen merged 2 commits into
mainfrom
lint_view_component_best_practices
Sep 3, 2026
Merged

koppen merged 2 commits into
mainfrom
lint_view_component_best_practices

Conversation

@koppen

@koppen koppen commented Sep 3, 2026

Copy link
Copy Markdown
Member

Copilot AI lite review requested due to automatic review settings September 3, 2026 08:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The configuration/comment intent for ViewComponent/ComponentSuffix is inconsistent (cop disabled while stating the suffix should be avoided), so the desired enforcement needs to be corrected or clarified before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR adds rubocop-view_component to the project’s RuboCop configuration to lint ViewComponent code against recommended best practices, integrating it alongside the existing Standard/RuboCop plugin setup.

Changes:

  • Added the rubocop-view_component gem (and prevented auto-require of linting gems where appropriate).
  • Enabled the rubocop-view_component RuboCop plugin and introduced initial ViewComponent cop configuration overrides.
File summaries
File Description
Gemfile Adds rubocop-view_component and adjusts linting gem require behavior.
.rubocop.yml Registers the rubocop-view_component plugin and configures ViewComponent-specific cops.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .rubocop.yml
@koppen
koppen merged commit 7e80710 into main Sep 3, 2026
10 checks passed
@koppen
koppen deleted the lint_view_component_best_practices branch September 3, 2026 08:37
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.

2 participants