( ruleset: Ruleset | undefined, callback: (messages: Hint[]) => void )
| 505 | |
| 506 | // hint stdin |
| 507 | function hintStdin( |
| 508 | ruleset: Ruleset | undefined, |
| 509 | callback: (messages: Hint[]) => void |
| 510 | ) { |
| 511 | process.stdin.setEncoding('utf8') |
| 512 | |
| 513 | const buffers: string[] = [] |
| 514 | |
| 515 | process.stdin.on('data', (text) => { |
| 516 | buffers.push(text) |
| 517 | }) |
| 518 | |
| 519 | process.stdin.on('end', () => { |
| 520 | const content = buffers.join('') |
| 521 | const messages = HTMLHint.verify(content, ruleset) |
| 522 | callback(messages) |
| 523 | }) |
| 524 | } |
| 525 | |
| 526 | // hint url |
| 527 | function hintUrl( |
no test coverage detected