eslint-plugin-react
Advanced tools
Comparing version 3.4.2 to 3.5.0
@@ -6,2 +6,20 @@ # Change Log | ||
## [3.5.0] - 2015-09-28 | ||
### Added | ||
* Add `no-direct-mutation-state` rule ([#133][], [#201][] @petersendidit) | ||
* Add `forbid-prop-types` rule ([#215][] @pwmckenna) | ||
### Fixed | ||
* Fix no-did-mount/update-set-state rules for ES6 classes | ||
### Changed | ||
* Update dependencies | ||
* Documentation improvements ([#222][] @Andersos) | ||
[3.5.0]: https://github.com/yannickcr/eslint-plugin-react/compare/v3.4.2...v3.5.0 | ||
[#133]: https://github.com/yannickcr/eslint-plugin-react/issues/133 | ||
[#201]: https://github.com/yannickcr/eslint-plugin-react/issues/201 | ||
[#215]: https://github.com/yannickcr/eslint-plugin-react/issues/215 | ||
[#222]: https://github.com/yannickcr/eslint-plugin-react/pull/222 | ||
## [3.4.2] - 2015-09-18 | ||
@@ -8,0 +26,0 @@ ### Fixed |
@@ -30,3 +30,5 @@ 'use strict'; | ||
'jsx-indent-props': require('./lib/rules/jsx-indent-props'), | ||
'jsx-closing-bracket-location': require('./lib/rules/jsx-closing-bracket-location') | ||
'jsx-closing-bracket-location': require('./lib/rules/jsx-closing-bracket-location'), | ||
'no-direct-mutation-state': require('./lib/rules/no-direct-mutation-state'), | ||
'forbid-prop-types': require('./lib/rules/forbid-prop-types') | ||
}, | ||
@@ -59,4 +61,6 @@ rulesConfig: { | ||
'jsx-indent-props': 0, | ||
'jsx-closing-bracket-location': 0 | ||
'jsx-closing-bracket-location': 0, | ||
'no-direct-mutation-state': 0, | ||
'forbid-prop-types': 0 | ||
} | ||
}; |
@@ -37,3 +37,3 @@ /** | ||
if ( | ||
ancestors[i].type !== 'Property' || | ||
(ancestors[i].type !== 'Property' && ancestors[i].type !== 'MethodDefinition') || | ||
ancestors[i].key.name !== 'componentDidMount' || | ||
@@ -40,0 +40,0 @@ (mode === 'allow-in-func' && depth > 1) |
@@ -29,3 +29,6 @@ /** | ||
for (var i = 0, j = ancestors.length; i < j; i++) { | ||
if (ancestors[i].type !== 'Property' || ancestors[i].key.name !== 'componentDidUpdate') { | ||
if ( | ||
(ancestors[i].type !== 'Property' && ancestors[i].type !== 'MethodDefinition') || | ||
ancestors[i].key.name !== 'componentDidUpdate' | ||
) { | ||
continue; | ||
@@ -32,0 +35,0 @@ } |
{ | ||
"name": "eslint-plugin-react", | ||
"version": "3.4.2", | ||
"version": "3.5.0", | ||
"author": "Yannick Croissant <yannick.croissant+npm@gmail.com>", | ||
@@ -26,7 +26,7 @@ "description": "React specific linting rules for ESLint", | ||
"devDependencies": { | ||
"babel-eslint": "4.1.2", | ||
"babel-eslint": "4.1.3", | ||
"coveralls": "2.11.4", | ||
"eslint": "1.4.3", | ||
"istanbul": "0.3.20", | ||
"mocha": "2.3.2" | ||
"eslint": "1.5.1", | ||
"istanbul": "0.3.21", | ||
"mocha": "2.3.3" | ||
}, | ||
@@ -33,0 +33,0 @@ "keywords": [ |
@@ -50,2 +50,3 @@ ESLint-plugin-React | ||
"react/display-name": 1, | ||
"react/forbid-prop-types": 1, | ||
"react/jsx-boolean-value": 1, | ||
@@ -57,2 +58,3 @@ "react/jsx-closing-bracket-location": 1, | ||
"react/jsx-no-duplicate-props": 1, | ||
"react/jsx-no-literals": 1, | ||
"react/jsx-no-undef": 1, | ||
@@ -67,2 +69,3 @@ "react/jsx-quotes": 1, | ||
"react/no-did-update-set-state": 1, | ||
"react/no-direct-mutation-state": 1, | ||
"react/no-multi-comp": 1, | ||
@@ -84,2 +87,3 @@ "react/no-set-state": 1, | ||
* [display-name](docs/rules/display-name.md): Prevent missing `displayName` in a React component definition | ||
* [forbid-prop-types](docs/rules/forbid-prop-types.md): Forbid certain propTypes | ||
* [jsx-boolean-value](docs/rules/jsx-boolean-value.md): Enforce boolean attributes notation in JSX | ||
@@ -101,2 +105,3 @@ * [jsx-closing-bracket-location](docs/rules/jsx-closing-bracket-location.md): Validate closing bracket location in JSX | ||
* [no-did-update-set-state](docs/rules/no-did-update-set-state.md): Prevent usage of `setState` in `componentDidUpdate` | ||
* [no-direct-mutation-state](docs/rules/no-direct-mutation-state.md): Prevent direct mutation of `this.state` | ||
* [no-multi-comp](docs/rules/no-multi-comp.md): Prevent multiple component definition per file | ||
@@ -103,0 +108,0 @@ * [no-set-state](docs/rules/no-set-state.md): Prevent usage of `setState` |
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
127456
35
2987
144