From fd9dffdd7c280d2071b897c09ffb477bd7fe8024 Mon Sep 17 00:00:00 2001 From: segayuu Date: Mon, 30 Oct 2017 11:23:03 +0900 Subject: [PATCH] cleanup lint error: semicolon --- types/request/index.d.ts | 12 ++++++------ types/request/request-tests.ts | 26 +++++++++++++------------- types/request/tslint.json | 1 - 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/types/request/index.d.ts b/types/request/index.d.ts index dbe65da3a5..41fcdd1b0f 100644 --- a/types/request/index.d.ts +++ b/types/request/index.d.ts @@ -180,7 +180,7 @@ declare namespace request { export type ResponseRequest = CoreOptions & { uri: Url; - } + }; export interface RequestResponse extends http.IncomingMessage { request: ResponseRequest; @@ -210,7 +210,7 @@ declare namespace request { postData?: { mimeType?: string; params?: NameValuePair[]; - } + }; } export interface NameValuePair { @@ -294,7 +294,7 @@ declare namespace request { token_secret?: string; transport_method?: 'body' | 'header' | 'query'; verifier?: string; - body_hash?: true | string + body_hash?: true | string; } export interface HawkOptions { @@ -307,9 +307,9 @@ declare namespace request { } export interface CookieJar { - setCookie(cookie: Cookie, uri: string | url.Url, options?: any): void - getCookieString(uri: string | url.Url): string - getCookies(uri: string | url.Url): Cookie[] + setCookie(cookie: Cookie, uri: string | url.Url, options?: any): void; + getCookieString(uri: string | url.Url): string; + getCookies(uri: string | url.Url): Cookie[]; } export interface CookieValue { diff --git a/types/request/request-tests.ts b/types/request/request-tests.ts index 54cd9c8a7a..edf6f4b9e7 100644 --- a/types/request/request-tests.ts +++ b/types/request/request-tests.ts @@ -610,10 +610,10 @@ var rand = Math.floor(Math.random() * 100000000).toString(); } , (error, response, body) => { if (response.statusCode == 201) { - console.log('document saved as: http://mikeal.iriscouch.com/testjs/' + rand) + console.log('document saved as: http://mikeal.iriscouch.com/testjs/' + rand); } else { - console.log('error: ' + response.statusCode) - console.log(body) + console.log('error: ' + response.statusCode); + console.log(body); } } ); @@ -625,28 +625,28 @@ request( } , (error, response, body) => { // body is the decompressed response body - console.log('server encoded the data as: ' + (response.headers['content-encoding'] || 'identity')) - console.log('the decoded data is: ' + body) + console.log('server encoded the data as: ' + (response.headers['content-encoding'] || 'identity')); + console.log('the decoded data is: ' + body); } ).on('data', (data: any) => { // decompressed data as it is received - console.log('decoded chunk: ' + data) + console.log('decoded chunk: ' + data); }) .on('response', (response: http.IncomingMessage) => { // unmodified http.IncomingMessage object response.on('data', (data: any[]) => { // compressed data as it is received - console.log('received ' + data.length + ' bytes of compressed data') - }) + console.log('received ' + data.length + ' bytes of compressed data'); + }); }); -var requestWithJar = request.defaults({jar: true}) +var requestWithJar = request.defaults({jar: true}); requestWithJar('http://www.google.com', () => { requestWithJar('http://images.google.com'); }); -var j = request.jar() -requestWithJar = request.defaults({jar: j}) +var j = request.jar(); +requestWithJar = request.defaults({jar: j}); requestWithJar('http://www.google.com', () => { requestWithJar('http://images.google.com'); }); @@ -663,12 +663,12 @@ request({url: url, jar: j}, () => { // var FileCookieStore = require('tough-cookie-filestore'); // NOTE - currently the 'cookies.json' file must already exist! // var j = request.jar(new FileCookieStore('cookies.json')); -requestWithJar = request.defaults({ jar : j }) +requestWithJar = request.defaults({ jar : j }); request('http://www.google.com', () => { request('http://images.google.com'); }); -var j = request.jar() +var j = request.jar(); request({url: 'http://www.google.com', jar: j}, () => { var cookie_string = j.getCookieString(url); // "key1=value1; key2=value2; ..." var cookies = j.getCookies(url); diff --git a/types/request/tslint.json b/types/request/tslint.json index 12fdeef86a..2ae43c1910 100644 --- a/types/request/tslint.json +++ b/types/request/tslint.json @@ -59,7 +59,6 @@ "prefer-switch": false, "prefer-template": false, "radix": false, - "semicolon": false, "strict-export-declare-modifiers": false, "triple-equals": false, "unified-signatures": false,