eslint-plugin-flowtype
Advanced tools
Comparing version 3.7.0 to 3.8.0
@@ -31,3 +31,3 @@ 'use strict'; | ||
return comments.some(function (comment) { | ||
return (0, _isFlowFileAnnotation2.default)(comment.value) && !(strict && /no/.test(comment.value)); | ||
return (0, _isFlowFileAnnotation2.default)(comment.value, strict); | ||
}); | ||
@@ -34,0 +34,0 @@ }; |
@@ -15,3 +15,3 @@ 'use strict'; | ||
exports.default = function (comment) { | ||
exports.default = function (comment, strict) { | ||
// eslint-disable-next-line flowtype/require-valid-file-annotation | ||
@@ -21,3 +21,9 @@ // The flow parser splits comments with the following regex to look for the @flow flag. | ||
return _lodash2.default.some(comment.split(/[ \t\r\n\\*/]+/), function (commentPart) { | ||
return FLOW_MATCHER.test(commentPart); | ||
var match = commentPart.match(FLOW_MATCHER); | ||
if (match === null) { | ||
return false; | ||
} | ||
return !strict || match[0] === '@flow'; | ||
}); | ||
@@ -24,0 +30,0 @@ }; |
@@ -63,3 +63,3 @@ { | ||
}, | ||
"version": "3.7.0" | ||
"version": "3.8.0" | ||
} |
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
464715
3123