Skip to content

Commit

Permalink
Fix: pass filepath to prettier (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
azz authored and not-an-aardvark committed Jan 16, 2018
1 parent 804ead7 commit 0b6ab55
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion eslint-plugin-prettier.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,8 @@ module.exports = {
const prettierOptions = Object.assign(
{},
prettierRcOptions,
eslintPrettierOptions
eslintPrettierOptions,
{ filepath: context.getFilename() }
);

const prettierSource = prettier.format(source, prettierOptions);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"eslint-plugin-self": "^1.0.1",
"mocha": "^3.1.2",
"moment": "^2.18.1",
"prettier": "^1.6.1",
"prettier": "^1.10.2",
"semver": "^5.3.0"
},
"engines": {
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -762,9 +762,9 @@ prelude-ls@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"

prettier@^1.6.1:
version "1.7.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.7.0.tgz#47481588f41f7c90f63938feb202ac82554e7150"
prettier@^1.10.2:
version "1.10.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.10.2.tgz#1af8356d1842276a99a5b5529c82dd9e9ad3cc93"

process-nextick-args@~1.0.6:
version "1.0.7"
Expand Down

0 comments on commit 0b6ab55

Please sign in to comment.