Opened 2 years ago
Last modified 6 weeks ago
#15783 assigned enhancement
JavaScript Coding Standards
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | WordPress.org |
| Component: | WordPress.org site | Version: | |
| Severity: | trivial | Keywords: | |
| Cc: | scribu, ocean90, xoodrew@…, lol@…, beau@… |
Description
Following up on scribu's and azaozz's comments in #15650, would a JavaScript Coding Standards page on the Codex (equivalent to http://codex.wordpress.org/WordPress_Coding_Standards and http://codex.wordpress.org/CSS_Coding_Standards) be useful?
It would not only include the usual code formatting, whitespace, brace position, semi-colon requirements etc, but also clarify on which code patterns are preferable for performance, both for the specific dependency library, and those that will give the smallest file when minified.
Another idea might be to introduce a file docblock that outlines which JS library or other file dependencies the current file has.
Some references:
Change History (7)
- Component changed from General to WordPress.org site
- Milestone changed from Awaiting Review to WordPress.org
- Owner set to koopersmith
- Status changed from new to assigned
comment:3
GamajoTech — 2 years ago
One other useful reference I should have added to the ticket:
Thanks nacin, I'll get in touch with koopersmith.
comment:5
DrewAPicture — 13 months ago
- Cc xoodrew@… added
comment:7
beaulebens — 6 weeks ago
- Cc beau@… added

koopersmith has been putting one together, for the core contributor handbook. He'll release a draft when he's gotten that far.