prettier-eslint
Advanced tools
Comparing version
@@ -43,2 +43,4 @@ 'use strict'; | ||
filePath = _ref.filePath, | ||
_ref$disableLog = _ref.disableLog, | ||
disableLog = _ref$disableLog === undefined ? options.disableLog : _ref$disableLog, | ||
_ref$eslintConfig = _ref.eslintConfig, | ||
@@ -49,4 +51,10 @@ eslintConfig = _ref$eslintConfig === undefined ? getConfig(filePath) : _ref$eslintConfig, | ||
var originalLogValue = options.disableLog; | ||
options.disableLog = disableLog; | ||
var pretty = prettify(text, prettierOptions); | ||
return eslintFix(pretty, eslintConfig); | ||
var fixed = eslintFix(pretty, eslintConfig); | ||
options.disableLog = originalLogValue; | ||
return fixed; | ||
} | ||
@@ -53,0 +61,0 @@ |
{ | ||
"name": "prettier-eslint", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "Formats your JavaScript using prettier followed by eslint --fix", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -92,2 +92,9 @@ # prettier-eslint | ||
#### disableLog (?Boolean) | ||
When there's an error, `prettier-eslint` will log it to the console. To disable this behavior you can either pass | ||
`disableLog` as an option to the call to `format` or you can set: `format.options.disableLog = true` to disable it | ||
"globally." | ||
## Inspiration | ||
@@ -94,0 +101,0 @@ |
17153
3.28%157
3.97%161
4.55%