@syncrona/prettier-plugin
Overview
SyncroNow AI is the ServiceNow scoped-application toolchain behind the syncrona CLI. This package is one of its build plugins: register it in the rules array of your sync.config.js and syncrona build runs it over every matching file.
This plugin allows you to run Prettier on all supported file types. Supports .prettierrc files.
Installation
npm i -D @syncrona/prettier-plugin
Options
This plugin takes the exact same options as .prettierrc.
Order of Configurations
- Check for
.prettierrc file and load those options
- Load from
sync.config.js options and override any overlapping values.
Example Usage
This example takes .js files and prettifies them.
module.exports={
rules:{
match:/\.js$/,
plugins:[
name:"@syncrona/prettier-plugin",
options:{
tabWidth:2,
semi:true
}
]
}
};
You could also create a .prettierrc file with those same options in your project and it would respect those values.