diff --git a/.gitattributes b/.gitattributes index ba071a99..e561ec1e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ +*.ts eol=lf /test/fixtures/crlf.vue eol=crlf diff --git a/src/parser-services.ts b/src/parser-services.ts index 9a63b99a..88cdfe70 100644 --- a/src/parser-services.ts +++ b/src/parser-services.ts @@ -29,8 +29,11 @@ function ensureEmitter(context: any): EventEmitter { emitter = new EventEmitter() emitters.set(ast, emitter) + // In eslint 4.4.0 name of this property has changed + const linter = context._linter || context.eslint + // Traverse - context.eslint.on("Program:exit", (node: ESLintProgram) => { + linter.on("Program:exit", (node: ESLintProgram) => { if (node.templateBody != null) { const generator = new NodeEventGenerator(emitter as EventEmitter) traverseNodes(node.templateBody, generator)