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.19.0 to 2.20.0

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="2.20.0"></a>
# [2.20.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.19.0...v2.20.0) (2016-10-06)
### Features
* add annotation enforcement option ([dd71ce8](https://github.com/gajus/eslint-plugin-flowtype/commit/dd71ce8))
<a name="2.19.0"></a>

@@ -7,0 +17,0 @@ # [2.19.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.18.2...v2.19.0) (2016-09-20)

@@ -16,2 +16,6 @@ 'use strict';

var defaults = {
annotationStyle: 'none'
};
var looksLikeFlowFileAnnotation = function looksLikeFlowFileAnnotation(comment) {

@@ -22,2 +26,10 @@ return (/@(?:no)?flow/i.test(comment)

var isValidAnnotationStyle = function isValidAnnotationStyle(node, style) {
if (style === 'none') {
return true;
}
return style === node.type.toLowerCase();
};
var schema = exports.schema = [{

@@ -35,2 +47,3 @@ enum: ['always']

var always = context.options[0] === 'always';
var style = _lodash2.default.get(context, 'options[1].annotationStyle', defaults.annotationStyle);

@@ -53,2 +66,8 @@ return {

}
if (!isValidAnnotationStyle(potentialFlowFileAnnotation, style)) {
var str = style === 'line' ? '`// @flow`' : '`/* @flow */`';
context.report(potentialFlowFileAnnotation, 'Flow file annotation style must be ' + str);
}
} else if (always) {

@@ -55,0 +74,0 @@ context.report(node, 'Flow file annotation is missing.');

2

package.json
{
"name": "eslint-plugin-flowtype",
"description": "Flowtype linting rules for ESLint.",
"version": "2.19.0",
"version": "2.20.0",
"main": "./dist/index.js",

@@ -6,0 +6,0 @@ "repository": {

Sorry, the diff of this file is too big to display

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