Formatting during Build

By default, formatting is not part of the Build Pipeline.

During build, the format task is only used for checking formatting issues. It will not re-write the components with the fixed format. In case you want to re-format your components, you should use the bit format command on your workspace.

Adding a formatter task to your build pipeline

To add your format task to your build pipeline you need to add its task into the build pipeline using the getBuildPipe of your env: (built in envs come with an API to only add new tasks to their existing pipe)

getBuildPipe(modifiers: GetBuildPipeModifiers = {}): BuildTask[] {
    return [...someTasks, formatterTask];
  }
CopiedCopy

To implement your own Formatter, see here.

CLI References