Opinionated, automatic Dart source code formatter that provides both an API and CLI tool. Version 1.3.2-dev is a development release. It enforces consistent Dart coding style as defined by the Dart team. Unlike alternatives, it is the official formatter from the Dart project, tightly integrated with the Dart ecosystem. Use for formatting Dart code in build pipelines or editor integration.
npm install dart-styleNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage of DartFormatter to format a simple Dart snippet using the ESM import.
Use inline type assertions or check the source for available options.
Check your import; the default export may be a promise. Use await formatter.formatCode().
Replace format with formatCode.
Run 'npm install dart-style' or 'yarn add dart-style'.
Use ESM import: import { DartFormatter } from 'dart-style';Use 'formatCode' instead of 'format'.
No dependency data recorded yet.