Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce prettier to keep the format of the codebase consistent #1103

Merged
merged 3 commits into from
Aug 7, 2017

Conversation

realityforge
Copy link
Contributor

This PR attempts to address issue #1060.

In short it introduces the prettier and lint-staged dependencies and setups the same tasks and configuration as in mobxjs/mobx-state-tree. The prettier was also run across the codebase to ensure it aligns with the new codestyle.

It should be notes that the codestyle in mobx-state-tree is not the same as in this codebase and thus this commit introduces a lot of changes. If you prefer I could align the rules used by prettier to more closely match this repository to minimize the amount of changes in the pull request.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 94.682% when pulling 7abea62 on realityforge:IntroducePrettier into 5e359b1 on mobxjs:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 94.682% when pulling 4482060 on realityforge:IntroducePrettier into 07ef41e on mobxjs:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 94.682% when pulling cc14442 on realityforge:IntroducePrettier into aa412a9 on mobxjs:master.

"lint-staged": {
"*.{ts,tsx,js,jsx}": [
"prettier --write --print-width 100 --tab-width 4 --no-semi",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mweststrate are you okay with no semi and tab with 4?

@mweststrate
Copy link
Member

mweststrate commented Aug 7, 2017 via email

@capaj
Copy link
Member

capaj commented Aug 7, 2017

awesome. Since this builds fine, I'll merge it.

@phiresky
Copy link
Contributor

Am I missing something or is there a dependency to husky missing for this to run as a pre-commit script?

@capaj
Copy link
Member

capaj commented Jan 15, 2018

@phiresky yeah we're missing husky. We have precommit script, but that won't run without husky. I'll open a PR. Thanks for noticing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants