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.10.0 to 2.11.0

dist/rules/genericSpacing.js

6

dist/index.js

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

var _genericSpacing = require('./rules/genericSpacing');
var _genericSpacing2 = _interopRequireDefault(_genericSpacing);
var _requireParameterType = require('./rules/requireParameterType');

@@ -57,2 +61,3 @@

'define-flow-type': _defineFlowType2.default,
'generic-spacing': _genericSpacing2.default,
'require-parameter-type': _requireParameterType2.default,

@@ -71,2 +76,3 @@ 'require-return-type': _requireReturnType2.default,

'define-flow-type': 0,
'generic-spacing': 0,
'require-parameter-type': 0,

@@ -73,0 +79,0 @@ 'require-return-type': 0,

2

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

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

@@ -23,2 +23,3 @@ <h1 id="eslint-plugin-flowtype">eslint-plugin-flowtype</h1>

* [`union-intersection-spacing`](#eslint-plugin-flowtype-rules-union-intersection-spacing)
* [`generic-spacing`](#eslint-plugin-flowtype-rules-generic-spacing)
* [`type-id-match`](#eslint-plugin-flowtype-rules-type-id-match)

@@ -1451,2 +1452,86 @@ * [`use-flow-type`](#eslint-plugin-flowtype-rules-use-flow-type)

<h3 id="eslint-plugin-flowtype-rules-generic-spacing"><code>generic-spacing</code></h3>
_The `--fix` option on the command line automatically fixes problems reported by this rule._
Enforces consistent spacing within generic type annotation parameters.
This rule takes one argument. If it is `'never'` then a problem is raised when there is a space surrounding the generic type parameters. If it is `'always'` then a problem is raised when there is no space surrounding the generic type parameters.
The default value is `'never'`.
The following patterns are considered problems:
```js
type X = Promise< string>
// Message: There must be no space at start of "Promise" generic type annotation
// Options: ["never"]
type X = Promise< string>
// Message: There must be no space at start of "Promise" generic type annotation
type X = FooBar<string >
// Message: There must be no space at end of "FooBar" generic type annotation
type X = Promise< string >
// Message: There must be no space at start of "Promise" generic type annotation
// Message: There must be no space at end of "Promise" generic type annotation
type X = Promise< (foo), bar, (((baz))) >
// Message: There must be no space at start of "Promise" generic type annotation
// Message: There must be no space at end of "Promise" generic type annotation
// Options: ["always"]
type X = Promise<string >
// Message: There must be a space at start of "Promise" generic type annotation
// Options: ["always"]
type X = FooBar< string>
// Message: There must be a space at end of "FooBar" generic type annotation
// Options: ["always"]
type X = Promise<string>
// Message: There must be a space at start of "Promise" generic type annotation
// Message: There must be a space at end of "Promise" generic type annotation
// Options: ["always"]
type X = Promise<(foo), bar, (((baz)))>
// Message: There must be a space at start of "Promise" generic type annotation
// Message: There must be a space at end of "Promise" generic type annotation
// Options: ["always"]
type X = FooBar< string >
// Message: There must be one space at start of "FooBar" generic type annotation
// Options: ["always"]
type X = FooBar< string >
// Message: There must be one space at end of "FooBar" generic type annotation
// Options: ["always"]
type X = Promise< (foo), bar, (((baz))) >
// Message: There must be one space at start of "Promise" generic type annotation
// Message: There must be one space at end of "Promise" generic type annotation
```
The following patterns are not considered problems:
```js
type X = Promise<string>
type X = Promise<(string)>
type X = Promise<(foo), bar, (((baz)))>
// Options: ["always"]
type X = Promise< string >
// Options: ["always"]
type X = Promise< (string) >
// Options: ["always"]
type X = Promise< (foo), bar, (((baz))) >
```
<h3 id="eslint-plugin-flowtype-rules-type-id-match"><code>type-id-match</code></h3>

@@ -1453,0 +1538,0 @@

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