Skip to content

Commit 7d72969

Browse files
sawa-zenmysticatea
authored andcommitted
🐛 fix warnings about max listeners (#44)
1 parent 86a2b61 commit 7d72969

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: src/parser-services.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ export function define(rootAST: ESLintProgram): ParserServices {
6363

6464
// If this is the first time, initialize the intermediate event emitter.
6565
if (emitter == null) {
66-
emitters.set(rootAST, (emitter = new EventEmitter()))
66+
emitter = new EventEmitter()
67+
emitter.setMaxListeners(0)
68+
emitters.set(rootAST, emitter)
6769

6870
const programExitHandler = scriptVisitor["Program:exit"]
6971
scriptVisitor["Program:exit"] = node => {

0 commit comments

Comments
 (0)