Unverified Commit 0319a5e1 authored by Bamieh's avatar Bamieh Committed by Anna Henningsen
Browse files

tools: add lint fixer for `require-buffer`

Adds `require-buffer` lint fixer.
If the buffer module is not required while `Buffer` is used, require the `buffer` module.
If the file has a `'use strict';` line, add the require after it on a separate line.
If the file does not have any (currently impossible with the `strict` rule) add it after the first comment (before the real code starts).

Fixes: https://github.com/nodejs/node/issues/16636
PR-URL: https://github.com/nodejs/node/pull/17144


Reviewed-By: default avatarMichaël Zasso <targos@protonmail.com>
parent 22198596
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment