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

Eslint plugin for react hook form #11918

Closed
RabbitShare opened this issue May 21, 2024 · 1 comment
Closed

Eslint plugin for react hook form #11918

RabbitShare opened this issue May 21, 2024 · 1 comment
Labels
feature request request a feature to be added

Comments

@RabbitShare
Copy link

Is your feature request related to a problem? Please describe.
I am frustrated when rhf start using Proxy for subscribing api methods

Describe the solution you'd like
Eslint plugin with rules of react hook form

Describe alternatives you've considered
I find plugin but it unmaintained https://www.npmjs.com/package/eslint-plugin-react-hook-form

Additional context
Provides autofix suggestions to adhere to best practices.

  1. Use destructuring assignment to access the properties of formState.
  2. Avoid providing undefined as a default value, as it conflicts with the default state of a controlled component.
  3. defaultValues are cached. To reset them, use the reset API. (it's better to provide jsdoc for this)
  4. defaultValues will be included in the submission result by default. (it's better to provide jsdoc for this)
  5. Avoid using custom objects with prototype methods, such as Moment or Luxon, as defaultValues.
  6. name is required and unique (except for native radio and checkbox).
  7. name cannot start with a number or use a number as a key name. Avoid special characters.
@RabbitShare RabbitShare added feature request request a feature to be added waiting-up-vote Waiting for votes from the community. labels May 21, 2024
@bluebill1049
Copy link
Member

I don't think have capacity at this stage moving to the back log hopefully someone else would create a new one or maintain the existing one.

@bluebill1049 bluebill1049 removed the waiting-up-vote Waiting for votes from the community. label May 25, 2024
@bluebill1049 bluebill1049 added this to Pause in React Hook Form May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request request a feature to be added
Projects
Development

No branches or pull requests

2 participants