Skip to content

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

Formats the created or updated files with the configured formatter, skipping node_modules, .git, the nx and yarn caches, and whatever the workspace’s ignore files cover. Which ignore files apply follows the formatter: prettier reads the workspace root only, oxfmt cascades.

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

Promise<void>

Remarks

NX_SKIP_FORMAT=true skips formatting - but not TSConfig path sorting, which is controlled by sortRootTsconfigPaths or NX_FORMAT_SORT_TSCONFIG_PATHS.