andrewn / neue-radio

Neue Radio: Prototype connected object using web technologies
10 stars 6 forks source link

Formats all code #94

Closed andrewn closed 6 years ago

andrewn commented 6 years ago

Formats all code and adds an npm run format-code task to do it in future.

I've added .prettierrc to prefer single quotes around non-JSX strings.

I've quickly smoke-tested this and it seems to work.

andrewn commented 6 years ago

Does your editor allow you to format on save?

Alternatively a pre-commit hook could work.

andrewn commented 6 years ago

Husky looks like it could let us define the hooks in package.json rather than rely on everyone installing them manually: https://github.com/typicode/husky

pixelblend commented 6 years ago

Husky looks like an excellent solution!

andrewn commented 6 years ago

PRs Welcome!

pixelblend commented 6 years ago

😡