eslint-plugin-react
Advanced tools
Comparing version 3.3.1 to 3.3.2
@@ -6,2 +6,17 @@ # Change Log | ||
## [3.3.2] - 2015-09-10 | ||
### Changed | ||
* Add `state` in lifecycle methods for `sort-comp` rule ([#197][] @mathieudutour) | ||
* Treat component with render which returns `createElement` as valid ([#206][] @epmatsw) | ||
### Fixed | ||
* Fix allowed methods on arrayOf in `prop-types` ([#146][]) | ||
* Fix default configuration for `jsx-boolean-value` ([#210][]) | ||
[3.3.2]: https://github.com/yannickcr/eslint-plugin-react/compare/v3.3.1...v3.3.2 | ||
[#146]: https://github.com/yannickcr/eslint-plugin-react/issues/146 | ||
[#197]: https://github.com/yannickcr/eslint-plugin-react/pull/197 | ||
[#206]: https://github.com/yannickcr/eslint-plugin-react/pull/206 | ||
[#210]: https://github.com/yannickcr/eslint-plugin-react/issues/210 | ||
## [3.3.1] - 2015-09-01 | ||
@@ -8,0 +23,0 @@ ### Changed |
@@ -13,3 +13,3 @@ /** | ||
var configuration = context.options[0] || {}; | ||
var configuration = context.options[0] || 'never'; | ||
@@ -16,0 +16,0 @@ var NEVER_MESSAGE = 'Value must be omitted for boolean attributes'; |
@@ -260,12 +260,2 @@ /** | ||
case 'arrayOf': | ||
return { | ||
type: 'array', | ||
children: { | ||
// Accept only array prototype and computed properties | ||
__ANY_KEY__: { | ||
acceptedProperties: Array.prototype | ||
}, | ||
__COMPUTED_PROP__: buildReactDeclarationTypes(argument) | ||
} | ||
}; | ||
case 'objectOf': | ||
@@ -272,0 +262,0 @@ return { |
@@ -66,2 +66,3 @@ /** | ||
'getDefaultProps', | ||
'state', | ||
'getInitialState', | ||
@@ -68,0 +69,0 @@ 'getChildContext', |
@@ -28,6 +28,14 @@ /** | ||
} | ||
var returnsJSX = | ||
node.argument && | ||
node.argument.type === 'JSXElement' | ||
; | ||
var returnsReactCreateElement = | ||
node.argument && | ||
node.argument.callee && | ||
node.argument.callee.property && | ||
node.argument.callee.property.name === 'createElement' | ||
; | ||
var isComponentRender = | ||
node.argument && | ||
node.argument.type === 'JSXElement' && | ||
(returnsJSX || returnsReactCreateElement) && | ||
scope.block.parent.key && scope.block.parent.key.name === 'render' | ||
@@ -34,0 +42,0 @@ ; |
{ | ||
"name": "eslint-plugin-react", | ||
"version": "3.3.1", | ||
"version": "3.3.2", | ||
"author": "Yannick Croissant <yannick.croissant+npm@gmail.com>", | ||
@@ -5,0 +5,0 @@ "description": "React specific linting rules for ESLint", |
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
119025