0xCourtney
0xCourtney

Reputation: 218

Code pushed or uploaded to GitHub shows extra whitespace

Whenever I push or manually upload code to github extra whitespace will appear in the committed code. I'm using prettier and eslint, I've tried pushing with both enabled and disabled, and with prettier only enabled.

Code as shown on GitHub:

User Settings:

Workspace Settings:

Upvotes: 0

Views: 2891

Answers (3)

Horea Porutiu
Horea Porutiu

Reputation: 176

For me, I had to click on Editor: Insert Spaces and then make sure that box is checked. Once I changed that, it worked fine for me.

Upvotes: 0

0xCourtney
0xCourtney

Reputation: 218

so setting "prettier.useTabs" to false resolves the issue, you would think that the code being pushed and code being displayed would be the same perhaps this is an issue to push to prettier's git repo but i digress, thanks for the feedback.

Upvotes: 1

apg
apg

Reputation: 2659

Do you use tabs instead of spaces? Most editors allow you (like you’ve shown) to customize what a tab character shows as (e.g. 8 spaces). My assumption is that your setting is smaller than what GitHub uses for its display. GitHub doesn’t modify your code.

Upvotes: 1

Related Questions