MadeInHaus / react-starter

A client-side SPA starter bundled with React, Redux, CSS Modules, React Router 4, and Webpack 4
MIT License
9 stars 2 forks source link

Add Husky for commit hooks and lint-staged. Run Prettier pre-commit #20

Closed chrisjcodes closed 6 years ago

chrisjcodes commented 6 years ago

Husky is a simple commit hook package that lets you run commands for git commit hooks.

Lint-staged allows you to run scripts on staged files like formatters or eslint

Setup prettier command to mimic my settings in my IDE

chrisjcodes commented 6 years ago

@stevescavo I tested this locally by turning off my prettier plugin, messing up formatting, staging and committing locally. Seems to work perfectly.

Please verify the settings for prettier I used are correct

chrisjcodes commented 6 years ago

I'm merging this, If we need to adjust settings we can do it as a hotfix