eslint-plugin-flowtype
Advanced tools
Comparing version 2.4.0 to 2.4.1
@@ -24,3 +24,3 @@ 'use strict'; | ||
if (typeAnnotation) { | ||
var spaceBefore = typeAnnotation.start - identifierNode.end; | ||
var spaceBefore = typeAnnotation.start - identifierNode.end - (identifierNode.optional ? 1 : 0); | ||
@@ -27,0 +27,0 @@ if (always && spaceBefore > 1) { |
{ | ||
"name": "eslint-plugin-flowtype", | ||
"description": "Flowtype linting rules for ESLint.", | ||
"version": "2.4.0", | ||
"version": "2.4.1", | ||
"main": "./dist/index.js", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -588,2 +588,6 @@ <h1 id="eslint-plugin-flowtype">eslint-plugin-flowtype</h1> | ||
// Options: ["never"] | ||
(foo ?: string) => {} | ||
// Message: There must be no space before "foo" parameter type annotation colon. | ||
// Options: ["always"] | ||
@@ -596,2 +600,10 @@ (foo: string) => {} | ||
// Message: There must be 1 space before "foo" parameter type annotation colon. | ||
// Options: ["always"] | ||
(foo?: string) => {} | ||
// Message: There must be a space before "foo" parameter type annotation colon. | ||
// Options: ["always"] | ||
(foo ?: string) => {} | ||
// Message: There must be 1 space before "foo" parameter type annotation colon. | ||
``` | ||
@@ -606,2 +618,4 @@ | ||
(foo?: string) => {} | ||
// Options: ["never"] | ||
@@ -612,2 +626,5 @@ (foo: string) => {} | ||
(foo : string) => {} | ||
// Options: ["always"] | ||
(foo ?: string) => {} | ||
``` | ||
@@ -614,0 +631,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
63919
727