Skip to content

Commit 0b6ab55

Browse files
azznot-an-aardvark
authored andcommitted
Fix: pass filepath to prettier (#76)
1 parent 804ead7 commit 0b6ab55

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

eslint-plugin-prettier.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,8 @@ module.exports = {
371371
const prettierOptions = Object.assign(
372372
{},
373373
prettierRcOptions,
374-
eslintPrettierOptions
374+
eslintPrettierOptions,
375+
{ filepath: context.getFilename() }
375376
);
376377

377378
const prettierSource = prettier.format(source, prettierOptions);

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"eslint-plugin-self": "^1.0.1",
4242
"mocha": "^3.1.2",
4343
"moment": "^2.18.1",
44-
"prettier": "^1.6.1",
44+
"prettier": "^1.10.2",
4545
"semver": "^5.3.0"
4646
},
4747
"engines": {

yarn.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -762,9 +762,9 @@ prelude-ls@~1.1.2:
762762
version "1.1.2"
763763
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
764764

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

769769
process-nextick-args@~1.0.6:
770770
version "1.0.7"

0 commit comments

Comments
 (0)