Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#40946 closed task (blessed) (fixed)

Update `.editorconfig` and `*.json` files to use tabs for indentation

Reported by: netweb's profile netweb Owned by: pento's profile pento
Milestone: 4.9 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch commit
Focuses: Cc:

Description

When the .editorconfig file was added in [27198] it included the option to indent *.json files with 2 spaces, this was inherited from the jQuery projects .editorconfig

There's no inherent reason(note) to require this, see https://stackoverflow.com/a/18698771/1911294

Originally discussed here https://github.com/WordPress/gutenberg/pull/1029#issuecomment-306362413

Note: An existing issue with npm 3 and 4 causes indentation issues, as such package.json needs to remain indented with spaces until WordPress chooses to use npm 5 as the required minimum.

Attachments (1)

40946.diff (1.2 KB) - added by netweb 7 years ago.

Download all attachments as: .zip

Change History (6)

@netweb
7 years ago

#1 @netweb
7 years ago

  • Keywords has-patch commit added
  • Type changed from defect (bug) to task (blessed)

This ticket was mentioned in Slack in #core by melchoyce. View the logs.


7 years ago

#3 @westonruter
7 years ago

  • Owner set to jnylen0
  • Status changed from new to reviewing

#4 @pento
7 years ago

  • Owner changed from jnylen0 to pento

#5 @pento
7 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 41835:

General: Remove .jshintrc and *.json from the 2-space-indent .editorconfig group.

JSON files don't need a particular indent style, this was just inherited from the jQuery .editorconfig, that we based ours on.

package.json is staying in the 2-space-indent group for now, due to npm 3 and 4 having issues. Upgrading to npm 5 will allow us to remove package.json, too.

Props netweb.
Fixes #40946.

Note: See TracTickets for help on using tickets.