This repository has been archived by the owner on Nov 10, 2023. It is now read-only.
Update dependency eslint-plugin-react to version 6.10.0 #240
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This Pull Request updates dependency eslint-plugin-react from version
6.9.0
to6.10.0
Changelog
6.10.0 / 2017-02-15
Add forbid-elements rule
detect used props in jsx
Jsx max props per line updates
Add forbid-foreign-prop-types rule
People may want to use babel-plugin-transform-react-remove-prop-types
to remove propTypes from their components in production builds, as an
optimization. The `forbib-foreign-prop-types` rule forbids using
another component's prop types unless they are explicitly
imported/exported, which makes that optimization less prone to error.
Fixes #696
Fix no-array-index-key typo
May specify a list of forbidden elements and a custom reporting message
Add void-dom-elements-no-children rule
To be consistent with the "Rule Options" section and other docs
fixes #885
Make sure it works when a prop is on the same line as the start line of
the tag, as well as with spread props that spans multiple lines.
If `when` is set to `multiline`, then this rule skips checking entirely
if the jsx opening tag is a single line.
Defaults `when` to `always` which is the current behavior.
In this patch we now consider props to be on the same "line" if the line
of where one prop ends matches the line of where the next prop begins.
e.g.
```
<App foo={{
}} bar />
```
`foo` and `bar` are now considered to be on the same line. Previously,
we would only look at the line in which the prop begins.
Test for require-default-props rule filter of undefined exception
There are some HTML elements that are only self-closing (e.g. `img`,
`br`, `hr`). These are collectively known as void DOM elements. If you
try to give these children, React will give you a warning like:
> Invariant Violation: img is a void element tag and must neither have
> `children` nor use `dangerouslySetInnerHTML`.
This rule prevents this from happening.
Since this is already a warning in React, we should add it to the
recommended configuration in our next major release.
Fixes #709
I didn't notice there were comments here.
Improve syntax highlighting of code snippets
Using the jsx tag on the fenced code blocks will instruct GitHub to use
JSX syntax highlighting, which will usually be better.
"jsx-indent" -> "react/jsx-indent"
jsx-sort-props noSortAlphabetically option
Check for createElement being called from React
Minor documentation updates for no-unused-prop-types rule for issue 976
Fix `require-default-props` rule when using Flow type from assignment
Per style-prop-object does not allow null jsx-eslint/eslint-plugin-react#812 (comment)
Added --save-dev to npm install commands in readme
show context in pure component for clarity
Fix no-array-index-key rule exception