eslint-plugin-flowtype-errors
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -7,2 +7,6 @@ 'use strict'; | ||
var _extends2 = require('babel-runtime/helpers/extends'); | ||
var _extends3 = _interopRequireDefault(_extends2); | ||
var _slicedToArray2 = require('babel-runtime/helpers/slicedToArray'); | ||
@@ -99,14 +103,3 @@ | ||
if (process.env.DEBUG_FLOWTYPE_ERRRORS === 'true') { | ||
return { | ||
message: entireMessage, | ||
path: firstMessage.path, | ||
start: firstMessage.loc.start.line, | ||
end: firstMessage.loc.end.line, | ||
loc: firstMessage.loc, | ||
parsedJSONArray: parsedJSONArray | ||
}; | ||
} | ||
return { | ||
return (0, _extends3.default)({}, process.env.DEBUG_FLOWTYPE_ERRRORS === 'true' ? parsedJSONArray : {}, { | ||
message: entireMessage, | ||
@@ -117,3 +110,3 @@ path: firstMessage.path, | ||
loc: firstMessage.loc | ||
}; | ||
}); | ||
}); | ||
@@ -120,0 +113,0 @@ |
@@ -36,4 +36,7 @@ const { execSync } = require('child_process'); | ||
'show-errors': function showErrors(context) { | ||
// We need to use exec sync here because ESLint doesn't support async plugins at the | ||
// moment 😭 That means we have to block the main thread every time we run collect errors | ||
// from Flow | ||
const collected = execSync( | ||
`node ${path.normalize('./node_modules/eslint-plugin-flowtype-errors/dist/collect.js')}` | ||
`node ${path.join(__dirname, './dist/collect.js')}` | ||
); | ||
@@ -48,3 +51,3 @@ const parsedJSONArray = JSON.parse(collected); | ||
// ESLint uses a 'zero-based' column mechanisim. That means that they count columns | ||
// ESLint uses a 'zero-based' column system. That means that they count columns | ||
// starting from 0. Weird... Flow's columns start at 1. Ughh | ||
@@ -51,0 +54,0 @@ .find(each => |
{ | ||
"name": "eslint-plugin-flowtype-errors", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Retrieve Flow errors as ESLint errors.", | ||
@@ -43,3 +43,3 @@ "author": "Amila Welihinda", | ||
"eslint": "^3.6.0", | ||
"eslint-config-airbnb": "^11.2.0", | ||
"eslint-config-airbnb": "^12.0.0", | ||
"eslint-formatter-pretty": "^1.0.0", | ||
@@ -46,0 +46,0 @@ "eslint-nibble-ignore": "^3.0.0", |
@@ -69,4 +69,6 @@ eslint-plugin-flowtype-errors | ||
* Allow Flow to be installed as peerDependency (currently uses latest Flow version) | ||
* Allow passing arguments to flow binary | ||
* Fix column number inconsistencies between ESLint and Flow | ||
* Run flow minimal amount of times for faster linting | ||
* Custom formatting of flow error messages | ||
* Enable rules to allow and disallow specific flow errors |
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
1411143
74
292