| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Detect installed code formatters and format files with them.
Detect the preferred formatter used in the project.
import { detect } from "@changesets/format";
const result = await detect();
// => "prettier"Options can be passed to the first parameter:
Format the given patterns with a specified or auto-detected formatter. It returns true if a formatter is found and the formatting process passes (even if the patterns didn't match any files), otherwise returns false.
import { format } from "@changesets/format";
await format(["src/index.ts"]);Options can be passed to the second parameter:
The core idea of this package is based on formatly, but implemented for Changesets' needs. However, it is still generic enough to be used by other projects than Changesets.
MIT
| Back | FazBrowse Home | New Git URL |