eslint-plugin-flowtype
Advanced tools
Comparing version 2.7.2 to 2.8.0
@@ -17,3 +17,3 @@ 'use strict'; | ||
var looksLikeFlowFileAnnotation = function looksLikeFlowFileAnnotation(comment) { | ||
return (/@flow/i.test(comment) | ||
return (/@(?:no)?flow/i.test(comment) | ||
); | ||
@@ -20,0 +20,0 @@ }; |
@@ -13,8 +13,12 @@ 'use strict'; | ||
var FLOW_MATCHER = /^@(?:no)?flow$/; | ||
exports.default = function (comment) { | ||
// The flow parser splits comments with the following regex to look for the @flow flag. | ||
// See https://github.com/facebook/flow/blob/a96249b93541f2f7bfebd8d62085bf7a75de02f2/src/parsing/docblock.ml#L39 | ||
return _lodash2.default.includes(comment.split(/[ \t\r\n\\*/]+/), '@flow'); | ||
return _lodash2.default.some(comment.split(/[ \t\r\n\\*/]+/), function (commentPart) { | ||
return FLOW_MATCHER.test(commentPart); | ||
}); | ||
}; | ||
module.exports = exports['default']; |
{ | ||
"name": "eslint-plugin-flowtype", | ||
"description": "Flowtype linting rules for ESLint.", | ||
"version": "2.7.2", | ||
"version": "2.8.0", | ||
"main": "./dist/index.js", | ||
@@ -6,0 +6,0 @@ "repository": { |
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
95795
818