electricitymaps / bloom-contrib

Making carbon footprint data available to everyone.
https://www.bloomclimate.com
MIT License
434 stars 104 forks source link

Formats all js files with 'prettier --write "*/**/*.js"' #385

Closed dafrie closed 4 years ago

dafrie commented 4 years ago

Editors formatOnSave functionality can not be enabled currently, since many files are not formatted according to the installed prettier defaults and this would create unnecessary noise in the PR's.

This PR thus formats all *.js files with the cmd prettier --write "*/**/*.js". It could also make sense to add a pre-commit hook to auto-format according to the config on each commit?

madsnedergaard commented 4 years ago

Hey @dafrie, this is awesome! Regarding auto-formatting, I added that earlier with Husky, but it failed due to our existing packages using older node-versions: https://github.com/tmrowco/northapp-contrib/pull/355

dafrie commented 4 years ago

ah, missed this - thanks for the info!