write-prettier-file
v3.0.3
Published
write prettier formatted file
Downloads
1,920
Readme
write-prettier-file
write prettier formatted file
Install
yarn add write-prettier-file
Ustage
import writePrettierFile from 'write-prettier-file'
await writePrettierFile('example.js', `hello('world');`)
API
writePrettierFile(file, data, options?)
file
Type: string | URL
Path to file.
data
Type: string
Source code, you want to format
options
Type: object
any value prettier-format
takes
options.resolveConfig
Type: boolean
Set to false
to prevent load config.
Related
- prettier-format run prettier on code.