prettier-eslint
Advanced tools
Comparing version
@@ -99,9 +99,15 @@ 'use strict'; | ||
var isCss = /\.(css|less|scss)$/.test(filePath); | ||
if (isCss) { | ||
formattingOptions.prettier.parser = 'postcss'; | ||
} | ||
var prettify = createPrettify(formattingOptions.prettier, prettierPath); | ||
var eslintFix = createEslintFix(formattingOptions.eslint, eslintPath); | ||
if (isCss) { | ||
return prettify(text, filePath); | ||
} | ||
if (prettierLast) { | ||
return prettify(eslintFix(text, filePath)); | ||
} | ||
return eslintFix(prettify(text), filePath); | ||
@@ -108,0 +114,0 @@ } |
{ | ||
"name": "prettier-eslint", | ||
"version": "6.2.3", | ||
"version": "6.3.0", | ||
"description": "Formats your JavaScript using prettier followed by eslint --fix", | ||
@@ -26,25 +26,25 @@ "main": "dist/index.js", | ||
"loglevel-colored-level-prefix": "^1.0.0", | ||
"prettier": "^1.3.0", | ||
"pretty-format": "^19.0.0", | ||
"prettier": "^1.4.2", | ||
"pretty-format": "^20.0.3", | ||
"require-relative": "^0.8.7" | ||
}, | ||
"devDependencies": { | ||
"all-contributors-cli": "^4.1.0", | ||
"all-contributors-cli": "^4.3.0", | ||
"babel-cli": "^6.24.1", | ||
"babel-jest": "^19.0.0", | ||
"babel-jest": "^20.0.3", | ||
"babel-polyfill": "^6.16.0", | ||
"babel-preset-env": "^1.3.3", | ||
"babel-preset-env": "^1.5.1", | ||
"babel-preset-stage-2": "^6.24.1", | ||
"babel-register": "^6.24.1", | ||
"chalk": "^1.1.3", | ||
"codecov": "^2.1.0", | ||
"codecov": "^2.2.0", | ||
"commitizen": "^2.8.6", | ||
"cz-conventional-changelog": "^2.0.0", | ||
"eslint-config-kentcdodds": "^12.2.1", | ||
"husky": "^0.13.3", | ||
"jest-cli": "^19.0.1", | ||
"nps": "^5.0.5", | ||
"eslint-config-kentcdodds": "^12.4.1", | ||
"husky": "^0.13.4", | ||
"jest-cli": "^20.0.4", | ||
"nps": "^5.3.1", | ||
"nps-utils": "^1.2.0", | ||
"opt-cli": "^1.5.1", | ||
"prettier-eslint-cli": "^3.2.0", | ||
"prettier-eslint-cli": "^4.0.3", | ||
"rimraf": "^2.5.4", | ||
@@ -51,0 +51,0 @@ "semantic-release": "^6.3.2", |
@@ -5,2 +5,5 @@ # prettier-eslint | ||
For files with an extension of `.css`, `.less`, or `.scss`, | ||
this only runs `prettier` since `eslint` cannot process those. | ||
[![Build Status][build-badge]][build] | ||
@@ -7,0 +10,0 @@ [![Code Coverage][coverage-badge]][coverage] |
42698
0.71%511
1.39%286
1.06%+ Added
- Removed
Updated
Updated