Prettier: Add `--loglevel` option

Created on 30 Sep 2017  路  3Comments  路  Source: prettier/prettier

from https://github.com/prettier/prettier/pull/2903#issuecomment-333285580

Possible option choices:

  • silent: nothing
  • error: error message
  • warn (default): error message + warning
  • debug: error message + warning + debug message
locked-due-to-inactivity enhancement

Most helpful comment

Error message:

error: Invalid --print-width value.
error: Expected an integer, but received: "0.3"

Warning:

warn: `--flow-parser` is deprecated. Use `--parser flow` instead.

Debug:

debug: found config file `/path/to/.prettierrc`
debug: resolved options `{ semi: false }`

All 3 comments

Could you give an example of:

  • an error message
  • a warning
  • a debug message

Error message:

error: Invalid --print-width value.
error: Expected an integer, but received: "0.3"

Warning:

warn: `--flow-parser` is deprecated. Use `--parser flow` instead.

Debug:

debug: found config file `/path/to/.prettierrc`
debug: resolved options `{ semi: false }`

I usually use debug for this kind of stuff because colors are cool.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nitwhiz picture nitwhiz  路  3Comments

brigand picture brigand  路  3Comments

MarkKahn picture MarkKahn  路  3Comments

thezanke picture thezanke  路  3Comments

tjvr picture tjvr  路  3Comments