eslint-plugin-flowtype
Advanced tools
Comparing version 2.3.0 to 2.3.1
@@ -33,3 +33,3 @@ /** | ||
const assertionCodes = _.map(assertionFiles, (filePath) => { | ||
const codes = require(filePath).default; | ||
const codes = require(filePath); | ||
@@ -36,0 +36,0 @@ return { |
@@ -18,2 +18,4 @@ 'use strict'; | ||
var sourceCode = context.getSourceCode(); | ||
return function (functionNode) { | ||
@@ -25,3 +27,4 @@ _lodash2.default.forEach(functionNode.params, function (identifierNode) { | ||
if (typeAnnotation) { | ||
var spaceAfter = typeAnnotation.typeAnnotation.start - typeAnnotation.start - 1; | ||
var token = sourceCode.getFirstToken(typeAnnotation, 1); | ||
var spaceAfter = token.start - typeAnnotation.start - 1; | ||
@@ -39,3 +42,4 @@ if (always && spaceAfter > 1) { | ||
if (functionNode.returnType) { | ||
var spaceAfter = functionNode.returnType.typeAnnotation.start - functionNode.returnType.start - 1; | ||
var token = sourceCode.getFirstToken(functionNode.returnType, 1); | ||
var spaceAfter = token.start - functionNode.returnType.start - 1; | ||
@@ -42,0 +46,0 @@ if (always && spaceAfter > 1) { |
@@ -11,3 +11,3 @@ 'use strict'; | ||
exports.default = function (context) { | ||
var pattern = new RegExp(context.options[0] || '^Type([A-Z][a-z0-9]+)+$'); | ||
var pattern = new RegExp(context.options[0] || '^([A-Z][a-z0-9]+)+Type$'); | ||
@@ -14,0 +14,0 @@ return { |
{ | ||
"name": "eslint-plugin-flowtype", | ||
"description": "Flowtype linting rules for ESLint.", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"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
52072
26
383
519