Skip to content

Commit

Permalink
πŸ› fix warnings about max listeners (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
sawa-zen authored and mysticatea committed Apr 21, 2019
1 parent 86a2b61 commit 7d72969
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/parser-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ export function define(rootAST: ESLintProgram): ParserServices {

// If this is the first time, initialize the intermediate event emitter.
if (emitter == null) {
emitters.set(rootAST, (emitter = new EventEmitter()))
emitter = new EventEmitter()
emitter.setMaxListeners(0)
emitters.set(rootAST, emitter)

const programExitHandler = scriptVisitor["Program:exit"]
scriptVisitor["Program:exit"] = node => {
Expand Down

0 comments on commit 7d72969

Please sign in to comment.