Skip to content

Conversation

@Rel1cx
Copy link
Owner

@Rel1cx Rel1cx commented Oct 27, 2025

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • Test
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #___
  • No

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • I have added a convincing reason for adding this feature, if necessary

Other information

@vercel
Copy link

vercel bot commented Oct 27, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
eslint-react Ready Ready Preview Comment Oct 27, 2025 3:50am

@Rel1cx Rel1cx requested a review from Copilot October 27, 2025 03:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the no-context-provider rule to require context providers to follow the naming convention of ending with "Context". This prevents false positives where components named *.Provider (but not actual React contexts) were incorrectly flagged by the rule.

Key Changes:

  • Added a naming convention check to validate that context names end with "Context"
  • Updated tests to reflect the new validation requirement
  • Updated documentation to reflect the relationship with the naming-convention/context-name rule

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/plugins/eslint-plugin-react-x/src/rules/no-context-provider.ts Added validation to check if context name ends with "Context"
packages/plugins/eslint-plugin-react-x/src/rules/no-context-provider.spec.ts Removed test cases for contexts not ending with "Context", added test case for non-context Provider component
packages/plugins/eslint-plugin-react-x/src/rules/no-context-provider.mdx Updated documentation to clarify relationship with naming-convention rule
packages/plugins/eslint-plugin-react-x/src/rules/no-use-context.mdx Updated related rules section to reference naming-convention rule
packages/plugins/eslint-plugin-react-x/src/rules/no-forward-ref.mdx Removed unrelated rule references from "See Also" section

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Rel1cx Rel1cx merged commit c22239b into main Oct 27, 2025
10 of 11 checks passed
@Rel1cx Rel1cx deleted the no-context-provider branch October 27, 2025 03:50
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