Socket
Socket
Sign inDemoInstall

eslint-plugin-flowtype

Package Overview
Dependencies
Maintainers
1
Versions
185
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-flowtype - npm Package Compare versions

Comparing version 2.7.2 to 2.8.0

2

dist/rules/requireValidFileAnnotation.js

@@ -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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc