Change pre commit hook format #47
Locked
kilian-goetz
started this conversation in
Polls
Replies: 2 comments
-
|
Well, if you take a look at the eslint's config file, you'll see that it becomes quite unreadable with a 4 space indentation. In general, when you have complex JSX elements description in your code, an indentation of 4 spaces starts to take too much place on the screen ... |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
This question is a point of view. Personally, I found more readable 4 space in JSX than 2. Moreover, it's a global norm of 4 space for one tabulation… |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Husky reformat code during commit. Currently, indentation is only two space. I think it could be better to change for 4 space like a real tabulation.
Motivation
Change for 4 space will render code more readable, and it will respect global formatting of 4 space for one tabulation.
Implementation
In
.prettierrc.jsonfile, add onlytabWidth:{ "bracketSpacing": false, "tabWidth": 4 }Beta Was this translation helpful? Give feedback.
All reactions