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

Deprecated rule no-onchange is still enforced #790

Closed
snood1205 opened this issue May 8, 2021 · 3 comments
Closed

Deprecated rule no-onchange is still enforced #790

snood1205 opened this issue May 8, 2021 · 3 comments

Comments

@snood1205
Copy link

Despite the rule no-onchange being deprecated in the documentation, the rule itself is still being enforced. Using eslint-plugin-jsx-a11y version 6.4.1 with the following code

<select value={configuration} onChange={handleConfigurationChange}>
  <option value="conference">Conference</option>
  ...
</select>

I get the error

error  onBlur must be used instead of onchange, unless absolutely necessary and it causes no negative consequences for keyboard only or screen reader users  jsx-a11y/no-onchange
@ljharb
Copy link
Member

ljharb commented May 8, 2021

What do you mean "still being enforced"? Are you referring to the recommended config?

@snood1205
Copy link
Author

What do you mean "still being enforced"? Are you referring to the recommended config?

Yes sorry, I was referring to the recommended config. If it's specified as off explicitly in the rules section, then it's not enforced, but if inheriting from recommended or strict it is enforced by default.

@ljharb
Copy link
Member

ljharb commented May 8, 2021

#757 is what marked it as deprecated, and also removed it from those configs; it's just not released yet.

The docs for the latest released version are https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/v6.4.1/docs/rules/no-onchange.md

@ljharb ljharb closed this as completed May 8, 2021
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

No branches or pull requests

2 participants