Skip to content

Commit

Permalink
Fixed filePath bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Egidius committed Feb 25, 2017
1 parent 9774940 commit 9d7cce9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ module.exports = {
## Pull requests
Welcome

## Roadmap
* More tests
* Possibility to use a pre-enforced webpack 2 loader to prevent multiple builds
* Add Flow support

### Inspiration
* [prettier-eslint](https://github.com/kentcdodds/prettier-eslint)
* [prettier-webpack-plugin](https://github.com/hawkins/prettier-webpack-plugin)
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function processFilePath({ file, encoding, filePath, eslintConfig, prettierOptio
}
const formatted = format(fmtOptions)
if (formatted !== source) {
fsWriteFile(filepath, { encoding: encoding })
fsWriteFile(file, formatted, { encoding: encoding })
.catch(err => reject(err.message))
.then(() => { resolve('success!') })
}
Expand Down

0 comments on commit 9d7cce9

Please sign in to comment.