Skip to content

fix(tooling): protect asset files from editorconfig normalization#8

Merged
maybebyte merged 1 commit into
masterfrom
004-editorconfig-assets
Jun 12, 2026
Merged

fix(tooling): protect asset files from editorconfig normalization#8
maybebyte merged 1 commit into
masterfrom
004-editorconfig-assets

Conversation

@maybebyte

Copy link
Copy Markdown
Owner

Summary

Closes the editor-side half of a review finding from #6: the .editorconfig trim/newline exception covered only the four vendored directories, leaving root-level hashed assets (favicon..svg verifiably lacks a final newline) exposed to editor-save normalization that would break their content hashes.

Changes

  • Disable insert_final_newline and trim_trailing_whitespace for png/webp/svg/ico/woff2 everywhere in the tree.

Testing

  • The pre-commit gate (which already protected these at commit time via the hashed-filename exclude) remains green; this change only stops editorconfig-honoring editors from altering asset bytes on save.

The trim/newline exception covered only the four vendored directories;
root-level hashed assets (favicon.<hash>.svg verifiably lacks a final
newline) were left exposed to editor-side normalization that would break
their content hashes. Disable both fixers for png/webp/svg/ico/woff2
everywhere. The pre-commit gate already protected these at commit time,
so this closes the editor-side half only.
@maybebyte maybebyte merged commit 12627bf into master Jun 12, 2026
2 checks passed
@maybebyte maybebyte deleted the 004-editorconfig-assets branch June 12, 2026 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant