Prettier


$ npm install --save-dev prettier

.prettierrc

{
  "tabWidth": 2,
  "printWidth": 80,
  "semi": true,
  "singleQuote": true,
  "bracketSpacing": true
}


**If needed to always use brackets for function with single argument (x) **

"arrowParens": "always",


.prettierignore

node_modules
*.test.js
*.spec.js


package.json

"format": "prettier --write src/**/*.{js,html}",
"format:check": "prettier --list-different src/**/*.{js,html}"