format:write

Overwrite un-formatted files.

Usage

โฏ

nx format:write

Install nx globally to invoke the command directly using nx, or use npx nx, yarn nx, or pnpm nx.

Options

OptionTypeDescription
--allbooleanFormat all projects.
--basestringBase of the current branch (usually main).
--excludestringExclude certain projects from being processed.
--filesstringChange the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces.
--headstringLatest commit of the current branch (usually HEAD).
--helpbooleanShow help.
--libs-and-appsbooleanFormat only libraries and applications files.
--projectsstringProjects to format (comma/space delimited).
--sort-root-tsconfig-pathsbooleanEnsure the workspace's tsconfig compilerOptions.paths are sorted. Warning: This will cause comments in the tsconfig to be lost. (Default: true)
--uncommittedbooleanUncommitted changes.
--untrackedbooleanUntracked changes.
--versionbooleanShow version number.