Skip to content

Commit

Permalink
Fix: prettierPath not working via config file (jestjs#7412)
Browse files Browse the repository at this point in the history
* removed default value of prettierPath from argv

* updated snapshot for show_config

* updated changelog

* fixed wrong package name in changelog
  • Loading branch information
grosto authored and captain-yossarian committed Jul 18, 2019
1 parent aa55a95 commit 823dca3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
- `[jest-haste-map]` [**BREAKING**] Recover files correctly after haste name collisions are fixed ([#7329](https://github.com/facebook/jest/pull/7329))
- `[jest-haste-map]` Remove legacy condition for duplicate module detection ([#7333](https://github.com/facebook/jest/pull/7333))
- `[jest-haste-map]` Fix `require` detection with trailing commas and ignore `import typeof` modules ([#7385](https://github.com/facebook/jest/pull/7385))
- `[jest-cli]` Fix to set prettierPath via config file ([#7412](https://github.com/facebook/jest/pull/7412))

### Chore & Maintenance

Expand Down
2 changes: 1 addition & 1 deletion e2e/__tests__/__snapshots__/show_config.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ exports[`--showConfig outputs config info and exits 1`] = `
\\"moduleNameMapper\\": {},
\\"modulePathIgnorePatterns\\": [],
\\"name\\": \\"[md5 hash]\\",
\\"prettierPath\\": null,
\\"prettierPath\\": \\"prettier\\",
\\"resetMocks\\": false,
\\"resetModules\\": false,
\\"resolver\\": null,
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-cli/src/cli/args.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ export const options = {
type: 'string',
},
prettierPath: {
default: 'prettier',
default: undefined,
description: 'The path to the "prettier" module used for inline snapshots.',
type: 'string',
},
Expand Down
1 change: 1 addition & 0 deletions types/Argv.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export type Argv = {|
outputFile: string,
preset: ?string,
projects: Array<string>,
prettierPath: ?string,
replname: ?string,
resetMocks: boolean,
resetModules: boolean,
Expand Down

0 comments on commit 823dca3

Please sign in to comment.