Test-Driven React 2: Incorrect Command to format (page 39)

@TrevorBurnham

On page 39, it is presented the following command to format:

"format": "eslint --fix . && prettier --loglevel warn --write ."

When running it, there is a following warning:

➜ npm run format

test-driven-palindromes@1.0.0 format
eslint --fix . && prettier --loglevel warn --write .

[warn] Ignored unknown option --loglevel=warn. Did you mean --log-level?

Changing the command as suggested, works fine:

"format": "eslint --fix . && prettier --log-level warn --write ."

You’re using a newer version of Prettier than the one in the book. They changed the argument from --loglevel to --log-level in Prettier v3, but the projects in the book use prettier@2.8.4.

1 Like