mirror of
https://github.com/nodejs/node.git
synced 2025-05-11 01:27:14 +00:00

This adds the `capitalized-comments` eslint rule to verify that actual sentences use capital letters as starting letters. It ignores special words and all lines below 62 characters. PR-URL: https://github.com/nodejs/node/pull/24808 Reviewed-By: Sam Ruby <rubys@intertwingly.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
24 lines
518 B
JavaScript
24 lines
518 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const spawn = require('child_process').spawn;
|
|
|
|
// Spawn a node child process in "interactive" mode (force the repl) and eval
|
|
const cp = spawn(process.execPath, ['-i', '-e', 'console.log("42")']);
|
|
let gotToEnd = false;
|
|
|
|
cp.stdout.setEncoding('utf8');
|
|
|
|
let output = '';
|
|
cp.stdout.on('data', function(b) {
|
|
output += b;
|
|
if (output === '> 42\n') {
|
|
gotToEnd = true;
|
|
cp.kill();
|
|
}
|
|
});
|
|
|
|
process.on('exit', function() {
|
|
assert(gotToEnd);
|
|
});
|