npm install --save-dev --save-exact prettier
{
"scripts": {
"format": "prettier --write '**/*.js' && xo --fix"
},
"prettier": {
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"bracketSpacing": false,
"semi": false,
"trailingComma": "none"
},
"xo": {
"prettier": true,
"esnext": false
}
}