Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

JavaScript style guide for documentation PRs

Open
#397 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript
Domain
documentation

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.

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 return statements?
  • var v. const and let?
  • Arrow functions v. declarations v. expressions?
  • When and when not to cache variables
  • Classes v. exports.render
  • Comments and/or JSDoc blocks?
  • import v. 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.

Dominant language
Nunjucks
Stars
547
Forks
727
Avg merge
7d 10h
Merged PRs (30d)
3

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from 11ty/docs

All issues in 11ty/docs

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.