Skip to content

Guide to contributing in lib/ folder? #16514

Closed

Description

@Ginden

As I'm working on pull request for #16178, I noticed that limited usage of certain ES2015+ features in lib/**/*.js code. My thoughts were confirmed while reading doc/guides/writing-tests.md.

For performance considerations, we only use a selected subset of ES.Next features in JavaScript code in the lib directory.

I think that publishing guide "what is preferred in codebase" would be preferred, because I was not able any description of such "selected subset".

Things that I would like to see:

  • class vs. util.inherits
  • closures
  • _* modules - what is difference between them and internal/* modules?
  • const vs. var vs. let
  • arrow functions

Activity

  1. added
    questionIssues asking questions about Node.js.
    on Oct 26, 2017
  2. Fishrock123 commented on Oct 27, 2017

    @Fishrock123
    Contributor

    I had a start at #6885 but never got very far with it. Maybe it is of some use but quite probably outdated in some ways.

  3. Trott commented on Oct 18, 2018

    @Trott
    Member

    Many of these issues are now handled by our lint rules.

    It seems like perhaps this should be closed. Feel free to re-open (or leave a comment requesting that it be re-opened) if you disagree. I'm just tidying up and not acting on a super-strong opinion or anything like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionIssues asking questions about Node.js.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions