prettier
The Prettier utility for formatting JS/TS (and others) code (https://prettier.io/).
Backend: pants.backend.experimental.javascript.lint.prettier
Config section: [prettier]
Basic options
args
--prettier-args="[<shell_str>, <shell_str>, ...]"PANTS_PRETTIER_ARGSpants.toml
[prettier]
args = [
<shell_str>,
<shell_str>,
...,
]
default:
[]Arguments to pass directly to Prettier, e.g. --prettier-args='--version'.
skip
--[no-]prettier-skipPANTS_PRETTIER_SKIPpants.toml
[prettier]
skip = <bool>
default:
FalseIf true, don't use Prettier when running pants fmt and pants lint.
Advanced options
binary_name
--prettier-binary-name=<str>PANTS_PRETTIER_BINARY_NAMEpants.toml
[prettier]
binary_name = <str>
default:
NoneOverride the binary to run for this tool. Defaults to the package name.
install_from_resolve
--prettier-install-from-resolve=<str>PANTS_PRETTIER_INSTALL_FROM_RESOLVEpants.toml
[prettier]
install_from_resolve = <str>
default:
NoneIf specified, install the tool using the lockfile for this named resolve, instead of the version configured in this subsystem.
If unspecified, the tool will use the default configured package manager [nodejs].package_manager`, and install the tool without a lockfile.
version
--prettier-version=<str>PANTS_PRETTIER_VERSIONpants.toml
[prettier]
version = <str>
default:
prettier@3.6.2Version string for the tool in the form package@version (e.g. prettier@3.6.2)
Deprecated options
None
Related subsystems
None