The guide worked for me at the time of writing.
Unfortunately, the current versions of
prettier-eslint-cli are both broken.
- Relative paths are broken with
prettier-eslint [ERROR]: There was trouble creating the ESLint CLIEngine.
There is a workaround for Linux and MacOS: inject
$(pwd) before the file path. For example,
"format": "prettier-eslint \"$(pwd)/**/*.js\""
- Cannot find module
This is still an open issue on GitHub. Suggested fix: downgrade
eslint to v4.x:
npm -g i eslint@4
That didn't work for me, though.