OperationXen / cyberpunkCTF

A CTF framework built on python using django, graphql and react
GNU General Public License v3.0
1 stars 0 forks source link

Prettier hook #18

Closed mikeyhogarth closed 5 years ago

mikeyhogarth commented 5 years ago

This adds a pre-commit hook to your react app that will absolutely ensure everything that gets committed gets prettified - this will mean if you ever collaborate with people who don't use prettier, they'll be forced to subscribe to your style guide even if they don't have the plugin.

It also means you can work on the code in something that doesn't have the plugin (e.g. another IDE) safe in the knowledge that husky has your back in terms of prettifying when you eventually commit.

Once this is installed, you can prettify everything in your src folder by running this command;

node_modules/.bin/prettier --write src/**/*.js

\M/

mikeyhogarth commented 5 years ago

Assuming you dont want this