prettier-eslint
Advanced tools
Comparing version
@@ -67,2 +67,3 @@ 'use strict'; | ||
var isJson = /\.json$/.test(filePath); | ||
var isTypeScript = /\.tsx?$/.test(filePath); | ||
@@ -74,2 +75,7 @@ if (isCss) { | ||
formattingOptions.prettier.trailingComma = 'none'; | ||
} else if (isTypeScript) { | ||
formattingOptions.prettier.parser = 'typescript'; | ||
// XXX: It seems babylon is getting a TypeScript plugin. | ||
// Should that be used instead? | ||
formattingOptions.eslint.parser = 'typescript-eslint-parser'; | ||
} | ||
@@ -131,3 +137,3 @@ | ||
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } /* eslint no-console:0, global-require:0, import/no-dynamic-require:0 */ | ||
/* eslint complexity: [1, 6] */ | ||
/* eslint complexity: [1, 7] */ | ||
@@ -134,0 +140,0 @@ |
{ | ||
"name": "prettier-eslint", | ||
"version": "7.0.1", | ||
"version": "7.1.0", | ||
"description": "Formats your JavaScript using prettier followed by eslint --fix", | ||
@@ -26,3 +26,5 @@ "main": "dist/index.js", | ||
"pretty-format": "^20.0.3", | ||
"require-relative": "^0.8.7" | ||
"require-relative": "^0.8.7", | ||
"typescript": "^2.4.2", | ||
"typescript-eslint-parser": "^7.0.0" | ||
}, | ||
@@ -29,0 +31,0 @@ "devDependencies": { |
44302
0.85%519
1.17%11
22.22%+ Added
+ Added
+ Added
+ Added
+ Added