[wp-trac] [WordPress Trac] #55429: Coding Standard: Use spaces for JSON instead of tabs
WordPress Trac
noreply at wordpress.org
Sat Mar 14 10:19:00 UTC 2026
#55429: Coding Standard: Use spaces for JSON instead of tabs
------------------------------+------------------------------
Reporter: scruffian | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: needs-refresh | Focuses:
------------------------------+------------------------------
Comment (by abcd95):
Reviewed the current state of trunk, The editorconfig change for JSON has
not been applied yet. The unrelated parts of the original patch (block
theme template detection) were addressed separately.
All JSON files in core already use tabs for indentation. The json_encode
spaces-to-tabs workaround already exists.
I think we should explicitly add [*.json] with indent_style = tab to
editorconfig, this formalizes the existing convention, requires no file
changes, and preserves the accessibility benefit of tabs noted in
[https://core.trac.wordpress.org/ticket/55429#comment:3 comment #3]
I am open to discussing and scrutinising this further, or I'll go ahead
and test this out whenever I next get the bandwidth.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55429#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list