Skip to content

Commit

Permalink
Fix: Fix javascript parser
Browse files Browse the repository at this point in the history
  • Loading branch information
sarvaje committed Apr 9, 2018
1 parent 1275130 commit f80f753
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/parser-javascript/src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const defaultParserOptions = {

export default class JavascriptParser extends Parser {
public constructor(sonarwhal: Sonarwhal) {
super(sonarwhal);
super(sonarwhal, 'javascript');

sonarwhal.on('fetch::end::script', this.parseJavascript.bind(this));
sonarwhal.on('element::script', this.parseJavascriptTag.bind(this));
Expand All @@ -32,7 +32,7 @@ export default class JavascriptParser extends Parser {
sourceCode: new eslint.SourceCode(code, ast)
};

await this.sonarwhal.emitAsync('parse::javascript::end', scriptData);
await this.sonarwhal.emitAsync(`parse::${name}::end`, scriptData);
}

private async parseJavascript(fetchEnd: FetchEnd) {
Expand Down

0 comments on commit f80f753

Please sign in to comment.