Formatting during Development

During development, Bit formats your components using the bit format commands. This command provides a standard dev experience for formatting the code of any kind of component, whether it is a NodeJS modules, a React component or anything else.

Format all components in the Workspace

Bit allows to format all components in the workspace regardless to the configured env and therefore Formatter with a single command. The bit format command will re-write your components source code with the new format. In case you only want to see which files has formatting issues, add the --check flag.

# Format components
bit format
CopiedCopy
# Check components for formatting issues
bit format --check
CopiedCopy

Format only components that changed

You can also use the --changed flag to format only new and modified components. Use bit status to learn which components are either new or modified.

bit format --changed
CopiedCopy

CLI References