Opened 14 years ago
Closed 11 years ago
#15783 closed enhancement (fixed)
JavaScript Coding Standards
Reported by: | GamajoTech | Owned by: | koopersmith |
---|---|---|---|
Milestone: | WordPress.org | Priority: | normal |
Severity: | trivial | Version: | |
Component: | WordPress.org Site | Keywords: | |
Focuses: | Cc: |
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 (14)
#1
follow-up:
↓ 9
@
14 years ago
- 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
#3
@
14 years ago
One other useful reference I should have added to the ticket:
Thanks nacin, I'll get in touch with koopersmith.
#9
in reply to:
↑ 1
;
follow-up:
↓ 10
@
11 years ago
Replying to nacin:
koopersmith has been putting one together, for the core contributor handbook. He'll release a draft when he's gotten that far.
Not sure if it's from koop, but the page exists: http://make.wordpress.org/core/handbook/coding-standards/javascript/
#10
in reply to:
↑ 9
@
11 years ago
Replying to ocean90:
Replying to nacin:
koopersmith has been putting one together, for the core contributor handbook. He'll release a draft when he's gotten that far.
Not sure if it's from koop, but the page exists: http://make.wordpress.org/core/handbook/coding-standards/javascript/
The JavaScript Coding Standards were added to the Codex in March 2013 by tommcfarlin, and moved to the Core Contributor Handbook in April 2013. I don't know if he used something from koop to base them on. That part should be considered complete.
Are there any plans to implement the file docblock (list dependencies)?
#13
in reply to:
↑ 12
@
11 years ago
Replying to helen:
Does this ticket still need to be open?
The standard is done, and in the Core Contributor Handbook, which was the original intent of this ticket. We can look at the file docblock portion of the ticket during the 3.7 inline docs effort, and open a new ticket if needed. I think it can be closed.
koopersmith has been putting one together, for the core contributor handbook. He'll release a draft when he's gotten that far.