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

Dev experience: Tab spacing discrepancy issue #2591

Open
machikoyasuda opened this issue Dec 12, 2024 · 3 comments
Open

Dev experience: Tab spacing discrepancy issue #2591

machikoyasuda opened this issue Dec 12, 2024 · 3 comments

Comments

@machikoyasuda
Copy link
Member

Some new files have 4 spaces. Our files are usually 2. This discrepancy does not get flagged or fixed by any linter or tool (pre-commit, Prettier, VS Code itself).

See: start--medicare.html as an example.

Try: Making a new html file and just start typing and tabbing. What does your editor automatically set the page as?

Tasks:

  • Find all the 4-spaced files and convert them to 2.
  • Figure out why this is happening.
  • Set 2 spaces as default.
@thekaveman
Copy link
Member

I don't think prettier is used for our HTML templates -- we use the monosans.djlint formatter.

But we didn't introduce that until a little while later... so maybe that is the source of the mixed spacing?

I wonder if djlint has settings for spacing?

@machikoyasuda
Copy link
Member Author

ah that's it!

https://djlint.com/docs/configuration/#indent

Image

@machikoyasuda
Copy link
Member Author

So we can decide whether to stick with the default (4), and mass re-format all the (2), or change the default to 2 and vice versa.

@machikoyasuda machikoyasuda changed the title Tab spacing discrepancy issue Dev experience: Tab spacing discrepancy issue Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants