diff --git a/editors/webstorm/README.md b/editors/webstorm/README.md index 0839e35c..c6c032b9 100644 --- a/editors/webstorm/README.md +++ b/editors/webstorm/README.md @@ -11,7 +11,7 @@ Go to *File | Settings | Tools | External Tools* for Windows and Linux or *WebSt * **Parameters** set `--write [other opts] $FilePathRelativeToProjectRoot$` * **Working directory** set `$ProjectFileDir$` -![Example](https://raw.githubusercontent.com/prettier/prettier/master/editors/webstorm/with-prettier.png) +![Example](./with-prettier.png) ### Process directories @@ -35,7 +35,11 @@ To automatically format using `prettier` on save, you can use a file watcher. Go to *File | Settings | Tools | File Watchers* for Windows and Linux or *WebStorm | Preferences | Tools | File Watchers* for OS X and click **+** to add a new tool. Let’s name it **Prettier**. +* **File Type**: JavaScript +* **Scope**: Current File * **Program** set the full path to a `prettier` executable, such as `/Users/developer/repo/jest/node_modules/.bin/prettier` (on OS X and Linux) or `C:/\Users\developer\repo\jest\node_modules\.bin\prettier.cmd` (on Windows). -* **Parameters** set `--write [other opts] $FilePath$` +* **Arguments** set `--write [other opts] $FilePath$` * **Working directory** set `$ProjectFileDir$` -* **Immediate file synchronization**: Uncheck to reformat on Save only (otherwise code will jump around while you type) +* **Immediate file synchronization**: Uncheck to reformat on Save only (otherwise code will jump around while you type). + +![Example](./prettier-file-wacther.png) diff --git a/editors/webstorm/prettier-file-wacther.png b/editors/webstorm/prettier-file-wacther.png new file mode 100644 index 00000000..e3c89634 Binary files /dev/null and b/editors/webstorm/prettier-file-wacther.png differ