Skip to content

require unification proposal #14041

Description

@vsemozhetbyt

"How to write a test..." guide advises require alphabetical sorting for new tests, but our codebase mostly does not follow this rule (some logical or random order is used).

I can try to revisit all require sections in benchmarks, libs, and tests. And while I am at it, all these things also can be addressed:

  1. Sort.
  2. Up and consolidate all require in one place when it is appropriate (no conditionals involved).
  3. Use destructuring.
  4. Insert a blank line after require section (not sure if any rules like this or this ones are required, but at least this can be unified).

However, this will be a time-consuming task, so I need to be sure if:

  1. This makes any sense and is not chasing my tail.
  2. Someone will have time to review.

Activity

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

    discussIssues opened for discussion and feedback.lib / srcIssues and PRs involving general changes in the lib/ or src/ directories.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