-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
rule proposal: forbid element/components #887
Comments
While a generic rule could be useful, I think a specific rule that requires that |
I can see that being useful as well but it seems like those rules have different use cases and they can both exist at the same time. The reason I chose to use a custom Button component instead of enforcing a type prop was because
|
Totally, I think adding both is good. |
Great! I can start on forbidding elements |
I think |
It would be useful to have a rule that forbids elements/components from a list of names.
In my organization we want to ban using
<button>
in favor of a custom<Button>
component that is simply:The reason is to prevent a bug in IE where pressing enter on an input could trigger the click event on a button even when they don't share a parent form if the button has
type="submit"
(default if notype
). (https://www.tjvantoll.com/2013/05/22/why-are-enter-keypresses-clicking-my-buttons-in-ie/)The text was updated successfully, but these errors were encountered: