Now that the Buffer.alloc, allocUnsafe, and from methods have landed, add a linting rule that requires their use within lib. Tests and benchmarks are explicitly excluded by the rule. PR-URL: https://github.com/nodejs/node/pull/5740 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
4 lines
90 B
Text
4 lines
90 B
Text
rules:
|
|
# Custom rules in tools/eslint-rules
|
|
require-buffer: 2
|
|
buffer-constructor: 2
|