Skip to content

formatFiles(tree, options?): Promise<void>

Formats all the created or updated files using Prettier

NameTypeDescription
treeTreethe file system tree
options?Objectoptions for the formatFiles function
options.sortRootTsconfigPaths?boolean-

Promise<void>

Remarks

Set the environment variable NX_SKIP_FORMAT to true to skip Prettier formatting. This is useful for repositories that use alternative formatters like Biome, dprint, or have custom formatting requirements.

Note: NX_SKIP_FORMAT only skips Prettier formatting. TSConfig path sorting (controlled by sortRootTsconfigPaths option or NX_FORMAT_SORT_TSCONFIG_PATHS) will still occur.