Skip to content
New issue

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

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

Already on GitHub? # to your account

Chore: reformat all templates to 2 spaces #2617

Merged
merged 4 commits into from
Jan 16, 2025
Merged

Conversation

lalver1
Copy link
Member

@lalver1 lalver1 commented Jan 8, 2025

Closes #2591

This PR:

  • Sets the default number of spaces to 2 for html files
  • Modifies the pre-commit config to run the djlint-reformat-django pre-commit job before linting
  • Reformats all templates to 2 spaces (ran pre-commit run --all --all-files in the dev container)
  • Adds node_modules/ to .gitignore

@lalver1 lalver1 self-assigned this Jan 8, 2025
@github-actions github-actions bot added deployment-dev [auto] Changes that will trigger a deploy if merged to dev front-end HTML/CSS/JavaScript and Django templates and removed deployment-dev [auto] Changes that will trigger a deploy if merged to dev labels Jan 8, 2025
Copy link

github-actions bot commented Jan 8, 2025

Coverage report

This PR does not seem to contain any modification to coverable code.

@lalver1 lalver1 added the chore Chores and tasks for code cleanup, dev experience, admin/configuration settings, etc. label Jan 8, 2025
@lalver1 lalver1 marked this pull request as ready for review January 8, 2025 18:52
@lalver1 lalver1 requested a review from a team as a code owner January 8, 2025 18:52
@lalver1 lalver1 marked this pull request as draft January 8, 2025 18:54
@machikoyasuda
Copy link
Member

Thank you for taking on this issue!

@lalver1 lalver1 force-pushed the chore/line-indentation branch from 84b2966 to 23b9c37 Compare January 14, 2025 16:15
@lalver1 lalver1 marked this pull request as ready for review January 14, 2025 16:41
@machikoyasuda
Copy link
Member

Starting my review on this.

machikoyasuda
machikoyasuda previously approved these changes Jan 15, 2025
Copy link
Member

@machikoyasuda machikoyasuda left a comment

Choose a reason for hiding this comment

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

Confirmed:

  • When switching from Python file (spaces: 4) to an HTML file (spaces: 2), VS Code appropriately switches spaces setting.
  • When creating a new HTML file, VS Code setting has the spaces set to 2.

Copy link
Member

@thekaveman thekaveman left a comment

Choose a reason for hiding this comment

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

Let's get it in!

@lalver1
Copy link
Member Author

lalver1 commented Jan 16, 2025

I made no changes except for rebasing this branch (git rebase main) to include the fix in #2629 and fix the merge conflict. Turns out that I didn't need to manually run pre-commit on benefits/eligibility/templates/eligibility/start--sbmtd-agency-card.html since the file automatically got formatted as part of the rebase.

@lalver1 lalver1 merged commit 82b4b67 into main Jan 16, 2025
11 checks passed
@lalver1 lalver1 deleted the chore/line-indentation branch January 16, 2025 16:31
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
chore Chores and tasks for code cleanup, dev experience, admin/configuration settings, etc. front-end HTML/CSS/JavaScript and Django templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dev experience: Tab spacing discrepancy issue
3 participants