JavaScript style guide for documentation PRs
Nobody has claimed this yet.
- Dominant language
- Nunjucks
- Stars
- 547
- Forks
- 726
- Avg merge
- 2h 23m
- Merged PRs (30d)
- 3
Description
@zachleat,
Can we drum up a quick style guide for vanilla JS code examples? I'm willing to forego my (otherwise highly opinionated) personal style for a standard.
I can mimic what's already there, but it'd be good to establish something formally—for consistency within the docs (if not also the codebase). Here are the major categories I'm thinking we could use some clear ground rules:
- Ternary operators v. conditional statements?
- Semicolon?
- Closures?
- Explicit
returnstatements? varv.constandlet?- Arrow functions v. declarations v. expressions?
- When and when not to cache variables
- Classes v.
exports.render - Comments and/or JSDoc blocks?
importv.require()this- Others?
I'm convinced more folks would reach for the vanilla 🍦 if they had more examples in the docs—and I wanna help.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the issue body and its 15-comment thread; no file or test is named. Determine whether the documentation PR style guide has a settled scope, then identify the documentation entry point and agree on the categories and examples that constitute completion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100