eslint-plugin-lodash-fp
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -9,2 +9,7 @@ # Change Log | ||
## [2.0.1] - 2016-08-24 | ||
### Fixed | ||
- Fixed crash in `no-extraneous-function-wrapping` when using `return` without an argument. | ||
- Fixed false report in `no-extraneous-function-wrapping` when using the last argument twice in the arguments ([#38], thanks [@godu]). | ||
## [2.0.0] - 2016-07-15 | ||
@@ -131,8 +136,11 @@ ### Removed | ||
[#36]: https://github.com/jfmengels/eslint-plugin-lodash-fp/pull/36 | ||
[#30]: https://github.com/jfmengels/eslint-plugin-lodash-fp/pull/30 | ||
[#14]: https://github.com/jfmengels/eslint-plugin-lodash-fp/pull/14 | ||
[#13]: https://github.com/jfmengels/eslint-plugin-lodash-fp/pull/13 | ||
[#11]: https://github.com/jfmengels/eslint-plugin-lodash-fp/pull/11 | ||
[#38]: https://github.com/jfmengels/eslint-plugin-lodash-fp/issues/38 | ||
[#30]: https://github.com/jfmengels/eslint-plugin-lodash-fp/issues/30 | ||
[#13]: https://github.com/jfmengels/eslint-plugin-lodash-fp/pull/13 | ||
[@dfadler]: https://github.com/dfadler | ||
[@godu]: https://github.com/godu | ||
[@gunar]: https://github.com/gunar | ||
@@ -143,4 +151,5 @@ [@izaakschroeder]: https://github.com/izaakschroeder | ||
[Unreleased]: https://github.com/jfmengels/eslint-plugin-lodash-fp/compare/v2.0.0...master | ||
[1.3.0]: https://github.com/jfmengels/eslint-plugin-lodash-fp/compare/v1.3.0...v2.0.0 | ||
[Unreleased]: https://github.com/jfmengels/eslint-plugin-lodash-fp/compare/v2.0.1...master | ||
[2.0.1]: https://github.com/jfmengels/eslint-plugin-lodash-fp/compare/v2.0.0...v2.0.1 | ||
[2.0.0]: https://github.com/jfmengels/eslint-plugin-lodash-fp/compare/v1.3.0...v2.0.0 | ||
[1.3.0]: https://github.com/jfmengels/eslint-plugin-lodash-fp/compare/v1.2.0...v1.3.0 | ||
@@ -147,0 +156,0 @@ [1.2.0]: https://github.com/jfmengels/eslint-plugin-lodash-fp/compare/v1.1.2...v1.2.0 |
{ | ||
"name": "eslint-plugin-lodash-fp", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "ESLint rules for lodash/fp", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -69,2 +69,5 @@ 'use strict'; | ||
module.exports = containsIdentifier; | ||
module.exports = { | ||
containsIdentifier, | ||
someContainsIdentifier | ||
}; |
@@ -5,3 +5,3 @@ 'use strict'; | ||
const enhance = require('./core/enhance'); | ||
const containsIdentifier = require('./core/contains-identifier'); | ||
const ci = require('./core/contains-identifier'); | ||
@@ -27,3 +27,3 @@ const isFunction = _.flow( | ||
const body = argNode.body.body; | ||
if (body.length !== 1 || body[0].type !== 'ReturnStatement') { | ||
if (body.length !== 1 || body[0].type !== 'ReturnStatement' || body[0].argument === null) { | ||
return false; | ||
@@ -39,3 +39,5 @@ } | ||
// or if `lastArgName` is used somewhere else in the function | ||
containsIdentifier(lastArgName, callExpression.callee) | ||
ci.containsIdentifier(lastArgName, callExpression.callee) || | ||
// or in `lastArgName` is used among the other arguments | ||
ci.someContainsIdentifier(lastArgName, _.initial(callExpression.arguments)) | ||
) { | ||
@@ -42,0 +44,0 @@ return false; |
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
52617
1270