eslint-plugin-flowtype
Advanced tools
Comparing version 2.2.2 to 2.2.3
@@ -26,3 +26,3 @@ 'use strict'; | ||
var isUndefinedReturnType = function isUndefinedReturnType(returnNode) { | ||
return returnNode.argument === null || returnNode.argument.name === 'undefined'; | ||
return returnNode.argument === null || returnNode.argument.name === 'undefined' || returnNode.argument.operator === 'void'; | ||
}; | ||
@@ -38,3 +38,4 @@ | ||
var isFunctionReturnUndefined = !targetNode.returnStatementNode || isUndefinedReturnType(targetNode.returnStatementNode); | ||
var isReturnTypeAnnotationUndefined = (0, _get3.default)(targetNode, 'functionNode.returnType.typeAnnotation.type') === 'GenericTypeAnnotation'; | ||
var returnTypeTypeAnnotationType = (0, _get3.default)(targetNode, 'functionNode.returnType.typeAnnotation.type'); | ||
var isReturnTypeAnnotationUndefined = returnTypeTypeAnnotationType === 'GenericTypeAnnotation' || returnTypeTypeAnnotationType === 'VoidTypeAnnotation'; | ||
@@ -41,0 +42,0 @@ if (isFunctionReturnUndefined && isReturnTypeAnnotationUndefined && !annotateUndefined) { |
{ | ||
"name": "eslint-plugin-flowtype", | ||
"description": "Flowtype linting rules for ESLint.", | ||
"version": "2.2.2", | ||
"version": "2.2.3", | ||
"main": "./dist/index.js", | ||
@@ -6,0 +6,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
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
40492
306