eslint-plugin-react
Advanced tools
Comparing version 1.4.0 to 1.4.1
@@ -0,1 +1,9 @@ | ||
1.4.1 / 2015-03-03 | ||
================== | ||
* fix this.props.children marked as missing in props validation ([#7][]) | ||
* fix usage of this.props without property ([#8][]) | ||
[#7]: https://github.com/yannickcr/eslint-plugin-react/issues/7 | ||
[#8]: https://github.com/yannickcr/eslint-plugin-react/issues/8 | ||
1.4.0 / 2015-02-24 | ||
@@ -2,0 +10,0 @@ ================== |
/** | ||
* @fileoverview Count <Jsx /> as use of the React variable | ||
* @fileoverview Prevent React to be marked as unused | ||
* @author Glen Mailer | ||
@@ -4,0 +4,0 @@ */ |
@@ -34,3 +34,3 @@ /** | ||
'MemberExpression': function(node) { | ||
if (node.object.type !== 'ThisExpression' || node.property.name !== 'props') { | ||
if (node.object.type !== 'ThisExpression' || node.property.name !== 'props' || !node.parent.property) { | ||
return; | ||
@@ -65,3 +65,3 @@ } | ||
for (var i = 0, j = usedPropTypes.length; i < j; i++) { | ||
if (declaredPropTypes.indexOf(usedPropTypes[i]) === -1) { | ||
if (declaredPropTypes.indexOf(usedPropTypes[i]) === -1 && usedPropTypes[i] !== 'children') { | ||
context.report(node, '\'' + usedPropTypes[i] + '\' is missing in props validation'); | ||
@@ -68,0 +68,0 @@ } |
/** | ||
* @fileoverview Validate that React is in scope when using JSX. | ||
* @fileoverview Prevent missing React when using JSX | ||
* @author Glen Mailer | ||
@@ -4,0 +4,0 @@ */ |
{ | ||
"name": "eslint-plugin-react", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"author": "Yannick Croissant <yannick.croissant+npm@gmail.com>", | ||
@@ -5,0 +5,0 @@ "description": "React specific linting rules for ESLint", |
@@ -67,4 +67,4 @@ ESLint-plugin-React | ||
* [no-did-update-set-state](docs/rules/no-did-update-set-state.md): Prevent usage of setState in componentDidUpdate | ||
* [jsx-uses-react](docs/rules/jsx-uses-react.md): Make JSX count towards use of a declared variable | ||
* [react-in-jsx-scope](docs/rules/react-in-jsx-scope.md): Prevent errors from not requiring React when using JSX | ||
* [jsx-uses-react](docs/rules/jsx-uses-react.md): Prevent React to be incorrectly marked as unused | ||
* [react-in-jsx-scope](docs/rules/react-in-jsx-scope.md): Prevent missing React when using JSX | ||
@@ -71,0 +71,0 @@ ## To Do |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20101