Skip to content

doc: missing require calls in some code examples #6596

@janriemer

Description

@janriemer

Hi,
wandering through the api docs, I recognized that some code examples do
not have a const foo = require('foo'); in it, but just use foo without requiring it.

Obviously when we talk about global modules like Buffer or process this is totally correct.
However some require calls are really missing, among others, in e.g. net module or querystring module.

I would like to create a PR for it, adding the missing require calls.


In this context, I would also like to mention the PR about introducing ESLint for the docs, where this ESLint rule seems to be a good fit for this issue.


Do you guys have any thoughts or proposals for this issue before I dive in?
Thanks for your feedback. 😉

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to the documentations.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions