From e8d48ef03dfb68b35bd3c270795b846bd04f7e8c Mon Sep 17 00:00:00 2001 From: Sean Tan Date: Tue, 12 Sep 2017 15:26:53 +0800 Subject: [PATCH] Fix tslint issues in v0/lunr-tests.ts --- types/lunr/v0/lunr-tests.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/types/lunr/v0/lunr-tests.ts b/types/lunr/v0/lunr-tests.ts index 65557ef96a..79f032f695 100644 --- a/types/lunr/v0/lunr-tests.ts +++ b/types/lunr/v0/lunr-tests.ts @@ -1,10 +1,8 @@ - - /** * Basic test, from http://lunrjs.com/ */ function basic_test() { - var index = lunr(function () { + const index = lunr(function() { this.field('title', {boost: 10}); this.field('body'); this.ref('id'); @@ -25,20 +23,19 @@ function basic_test() { index.search('foo'); } - /** * Pipeline test, from http://lunrjs.com/ */ function pipeline_test() { - var index = lunr(function () { - this.pipeline.add(function (token:string, tokenIndex:number, tokens:string[]):string { + const index = lunr(function() { + this.pipeline.add(function(token: string, tokenIndex: number, tokens: string[]): string { // text processing in here return token; }); - this.pipeline.after(lunr.stopWordFilter, function (token:string, tokenIndex:number, tokens:string[]):string { + this.pipeline.after(lunr.stopWordFilter, function(token: string, tokenIndex: number, tokens: string[]): string { // text processing in here return token; }); - }) -} \ No newline at end of file + }); +}