Skip to content

Conversation

@Rel1cx
Copy link
Owner

@Rel1cx Rel1cx commented Dec 12, 2025

…nvention/use-state`

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 Dec 12, 2025

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

Project Deployment Review Updated (UTC)
eslint-react Ready Ready Preview, Comment Dec 12, 2025 9:03pm

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 adds two new configuration options to the naming-convention/use-state rule to provide more flexibility in how the rule enforces useState hook usage patterns.

  • Adds enforceAssignment option (default: false) to control whether useState must be destructured into a value and setter pair
  • Adds enforceSetterName option (default: true) to control whether the setter name must follow the symmetric naming convention
  • Updates documentation across multiple rule files to use a more consistent and structured format for describing rule options

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/plugins/eslint-plugin/README.md Updates branch references in documentation links (contains issues with branch names)
packages/plugins/eslint-plugin-react-x/src/rules/no-useless-fragment.mdx Restructures rule options documentation with clearer formatting and type definitions
packages/plugins/eslint-plugin-react-x/src/rules/no-unstable-default-props.mdx Restructures rule options documentation with clearer formatting and type definitions
packages/plugins/eslint-plugin-react-naming-convention/src/rules/use-state.ts Implements the new enforceAssignment and enforceSetterName options with proper schema and default values
packages/plugins/eslint-plugin-react-naming-convention/src/rules/use-state.spec.ts Adds explicit options to test cases to properly test the new configuration options
packages/plugins/eslint-plugin-react-naming-convention/src/rules/use-state.mdx Documents the new rule options with clear descriptions and default values
packages/plugins/eslint-plugin-react-naming-convention/src/rules/filename.mdx Restructures rule options documentation with clearer formatting and type definitions
packages/plugins/eslint-plugin-react-naming-convention/src/rules/filename-extension.mdx Restructures rule options documentation with clearer formatting and type definitions
packages/plugins/eslint-plugin-react-naming-convention/src/rules/component-name.mdx Restructures rule options documentation with clearer formatting and type definitions

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

@Rel1cx Rel1cx merged commit 1085232 into main Dec 12, 2025
18 checks passed
@Rel1cx Rel1cx deleted the naming-convention-use-state-3 branch December 12, 2025 21:04
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