Prettier enforces a consistent code style (i.e. Prettier is going to do the painstaking work of reprinting it like that for you: foo ( reallyLongArg ( ), omgSoManyParameters ( ), IShouldRefactorThis ( ), isThereSeriouslyAnotherOne ( ), ) Suddenly our previous format for calling function breaks down because this is too long. However, we've all run into this situation: foo ( reallyLongArg ( ), omgSoManyParameters ( ), IShouldRefactorThis ( ), isThereSeriouslyAnotherOne ( ) ) ![]() It fits in a single line so it’s going to stay as is. Prettier takes your code and reprints it from scratch by taking the line length into account.įor example, take the following code: foo (arg1, arg2, arg3, arg4 ) It removes all original styling * and ensures that all outputted code conforms to a consistent style.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |