motleyagency / eslint-config-motley

Motley (https://motley.fi) JavaScript/Typescript guidelines as ESLint rules with Prettier autoformatting
https://motley.fi
MIT License
6 stars 0 forks source link

Create .prettierrc instead of inline options #48

Closed bostrom closed 6 years ago

bostrom commented 6 years ago

The postinstall script now adds the--single-quote --trailing-comma all flags to the prettier command in package.json. This works well for the precommit hook, but if the developer has enabled a prettier-plugin in the editor which prettifies the files on save, those rules aren't picked up, but need to be separately specified in a .prettierrc file leading to duplication and potential WTFs.

If the postinstall script instead would create the aforementioned .prettierrc and place the rules there, the precommit hook and potential editor-plugins would read the rules from that file and everyone is 🌞

Any problems with this?

petetnt commented 6 years ago

Sure, go ahead. I don't use editor integrations myself, so it's clearly an oversight from my part :)