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

Rule proposal: disallow children prop #720

Closed
lencioni opened this issue Jul 26, 2016 · 0 comments
Closed

Rule proposal: disallow children prop #720

lencioni opened this issue Jul 26, 2016 · 0 comments

Comments

@lencioni
Copy link
Collaborator

Children should always be actual children, not passed in as a prop.

Bad:

<div children='Children' />

Good:

<div>
  Children
</div>

This should also apply to React.createElement.

Name: no-children-prop?

benstepp added a commit to benstepp/eslint-plugin-react that referenced this issue Jul 27, 2016
Prevents children being passed as props. Children should be actual
children.
benstepp added a commit to benstepp/eslint-plugin-react that referenced this issue Jul 27, 2016
Prevents children being passed as props. Children should be actual
children.
benstepp added a commit to benstepp/eslint-plugin-react that referenced this issue Jul 27, 2016
Prevents children being passed as props. Children should be actual
children.

* Add Component to tests for no-children-prop
* Add note in docs about recommended behavior
* Change syntax in docs for no-children-prop to jsx
benstepp added a commit to benstepp/eslint-plugin-react that referenced this issue Jul 27, 2016
Prevents children being passed as props. Children should be actual
children.

---

* Add Component to tests for no-children-prop
* Add note in docs about recommended behavior
* Change syntax in docs for no-children-prop to jsx

---

* Clarify that multiple arguments may be passed as children to
React.createElement
* Reorganize tests to show JSX with createElement counterpart immediately
following.
* Added test cases with a non-children property
* Added test cases with multiple children
benstepp added a commit to benstepp/eslint-plugin-react that referenced this issue Jul 27, 2016
Prevents children being passed as props. Children should be actual
children.

---

* Add Component to tests for no-children-prop
* Add note in docs about recommended behavior
* Change syntax in docs for no-children-prop to jsx

---

* Clarify that multiple arguments may be passed as children to
React.createElement
* Reorganize tests to show JSX with createElement counterpart immediately
following.
* Added test cases with a non-children property
* Added test cases with multiple children

---

* Add no-children-prop to recommended config
benstepp added a commit to benstepp/eslint-plugin-react that referenced this issue Sep 16, 2016
Prevents children being passed as props. Children should be actual
children.

---

* Add Component to tests for no-children-prop
* Add note in docs about recommended behavior
* Change syntax in docs for no-children-prop to jsx

---

* Clarify that multiple arguments may be passed as children to
React.createElement
* Reorganize tests to show JSX with createElement counterpart immediately
following.
* Added test cases with a non-children property
* Added test cases with multiple children

---

* Add no-children-prop to recommended config
benstepp added a commit to benstepp/eslint-plugin-react that referenced this issue Sep 16, 2016
Prevents children being passed as props. Children should be actual
children.

---

* Add Component to tests for no-children-prop
* Add note in docs about recommended behavior
* Change syntax in docs for no-children-prop to jsx

---

* Clarify that multiple arguments may be passed as children to
React.createElement
* Reorganize tests to show JSX with createElement counterpart immediately
following.
* Added test cases with a non-children property
* Added test cases with multiple children

---

* Add no-children-prop to recommended config
benstepp added a commit to benstepp/eslint-plugin-react that referenced this issue Sep 16, 2016
Prevents children being passed as props. Children should be actual
children.

---

* Add Component to tests for no-children-prop
* Add note in docs about recommended behavior
* Change syntax in docs for no-children-prop to jsx

---

* Clarify that multiple arguments may be passed as children to
React.createElement
* Reorganize tests to show JSX with createElement counterpart immediately
following.
* Added test cases with a non-children property
* Added test cases with multiple children

---

* Add no-children-prop to recommended config

---

* Remove recommended config for no-children-prop
benstepp added a commit to benstepp/eslint-plugin-react that referenced this issue Sep 16, 2016
Prevents children being passed as props. Children should be actual
children.

---

* Add Component to tests for no-children-prop
* Add note in docs about recommended behavior
* Change syntax in docs for no-children-prop to jsx

---

* Clarify that multiple arguments may be passed as children to
React.createElement
* Reorganize tests to show JSX with createElement counterpart immediately
following.
* Added test cases with a non-children property
* Added test cases with multiple children

---

* Add no-children-prop to recommended config

---

* Remove recommended config for no-children-prop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants