ni / ni/javascript-styleguide

Figure out what to do about new JavaScript private member #syntax

Open
#94 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
9
Forks
11
PR merge metrics
No merged PRs in 30d

Description

The JavaScript feature to set class members as private by prefixing their name with # is now supported in all modern browsers. This issue tracks its impact on our coding conventions.

Things to look into:

  1. do our conventions currently allow the syntax in JS code? Should they?
  2. do our conventions currently allow the syntax in TS code? Should they?
    • TypeScript obviously has its own private member syntax (via the private keyword). We should see if they've expressed an opinion about how that syntax will interact with the JS syntax.

Contributor guide

Open the contributing guide

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.

Research direction

Start by reviewing the existing JavaScript and TypeScript coding conventions, then consult the linked MDN documentation and TypeScript guidance on private members. Compare the # syntax with TypeScript's private keyword and document a decided convention for both languages.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.