Opened 3 years ago
Last modified 3 years ago
#55429 new feature request
Coding Standard: Use spaces for JSON instead of tabs
Reported by: | scruffian | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | needs-refresh |
Focuses: | Cc: |
Description
When PHP outputs JSON using json_encode
, there's no option to output it with tabs instead of spaces. This is particularly relevant in since https://github.com/WordPress/gutenberg/pull/39048 merged - we now convert theme.json files that were using tabs to spaces.
We could use a regex to convert these spaces back to tabs, but maybe its simpler to default to spaces for JSON files since that is the format that PHP uses.
Opening this ticket to start the discussion...
Attachments (1)
Change History (4)
This ticket was mentioned in Slack in #core-editor by scruffian. View the logs.
3 years ago
#3
@
3 years ago
- Component changed from General to Build/Test Tools
We all know this is an age-old discussion, but I recently learned that there's an accessibility benefit to tabs instead of spaces. It allows developers with vision difficulties to control the spacing in their editor which they cannot do with spaces: https://twitter.com/johnbillion/status/1380173004307595266.
Coding standards change