Skip to content

Commit

Permalink
Enable --alwaysStrict option in whole project
Browse files Browse the repository at this point in the history
  • Loading branch information
Huachao committed Dec 10, 2019
1 parent 49fb21f commit d47bc09
Show file tree
Hide file tree
Showing 72 changed files with 1 addition and 142 deletions.
2 changes: 0 additions & 2 deletions src/common/arrayUtility.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

export class ArrayUtility {
public static skipWhile<T>(items: T[], callbackfn: (value: T, index: number, array: T[]) => boolean): T[] {
let index = 0;
Expand Down
2 changes: 0 additions & 2 deletions src/common/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

export const ExtensionId: string = 'humao.rest-client';
export const AiKey: string = 'ad746e27-4a36-441c-8b94-5db178f81ae3';
export const CSSFileName: string = 'rest-client.css';
Expand Down
2 changes: 0 additions & 2 deletions src/common/delegates.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

export interface Action<T> {
(item: T): void;
}
Expand Down
2 changes: 0 additions & 2 deletions src/controllers/codeSnippetController.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import { EOL } from 'os';
import * as url from 'url';
import { Clipboard, env, QuickInputButtons, QuickPickItem, window } from 'vscode';
Expand Down
2 changes: 0 additions & 2 deletions src/controllers/environmentController.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import { languages, StatusBarAlignment, StatusBarItem, window } from 'vscode';
import * as Constants from '../common/constants';
import { RestClientSettings } from '../models/configurationSettings';
Expand Down
2 changes: 0 additions & 2 deletions src/controllers/historyController.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import * as fs from 'fs-extra';
import moment from 'moment';
import { EOL } from 'os';
Expand Down
2 changes: 0 additions & 2 deletions src/controllers/requestController.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import { EOL } from 'os';
import { ExtensionContext, Range, StatusBarAlignment, StatusBarItem, ViewColumn, window } from 'vscode';
import { ArrayUtility } from "../common/arrayUtility";
Expand Down
2 changes: 0 additions & 2 deletions src/controllers/responseController.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import * as fs from 'fs-extra';
import * as os from 'os';
import * as path from 'path';
Expand Down
2 changes: 0 additions & 2 deletions src/logger.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import { OutputChannel, window } from 'vscode';
import { RestClientSettings } from './models/configurationSettings';
import { LogLevel } from './models/logLevel';
Expand Down
2 changes: 0 additions & 2 deletions src/models/IRequestParser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import { HttpRequest } from './httpRequest';

export interface IRequestParser {
Expand Down
2 changes: 0 additions & 2 deletions src/models/base.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import * as http from 'http';

export type ResponseHeaders = http.IncomingHttpHeaders;
Expand Down
2 changes: 0 additions & 2 deletions src/models/environmentPickItem.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import { QuickPickItem } from 'vscode';

export class EnvironmentPickItem implements QuickPickItem {
Expand Down
2 changes: 0 additions & 2 deletions src/models/formParamEncodingStrategy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

export enum FormParamEncodingStrategy {
Automatic,
Never,
Expand Down
2 changes: 0 additions & 2 deletions src/models/harHttpRequest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import { ParsedUrlQuery } from 'querystring';
import { parse as urlParse } from 'url';

Expand Down
2 changes: 0 additions & 2 deletions src/models/historyQuickPickItem.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import { QuickPickItem } from 'vscode';
import { SerializedHttpRequest } from './httpRequest';

Expand Down
2 changes: 0 additions & 2 deletions src/models/hostCertificate.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

export class HostCertificate {
public constructor(public cert?: Buffer, public key?: Buffer, public pfx?: Buffer, public passphrase?: string) {
}
Expand Down
2 changes: 0 additions & 2 deletions src/models/httpElement.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import { MarkdownString, SnippetString } from 'vscode';

export class HttpElement {
Expand Down
2 changes: 0 additions & 2 deletions src/models/httpRequest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import { Stream } from 'stream';
import { getContentType } from '../utils/misc';
import { RequestHeaders } from './base';
Expand Down
2 changes: 0 additions & 2 deletions src/models/httpResponse.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import { getContentType } from '../utils/misc';
import { ResponseHeaders } from './base';
import { HttpRequest } from "./httpRequest";
Expand Down
2 changes: 0 additions & 2 deletions src/models/httpResponseTimingPhases.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

export class HttpResponseTimingPhases {
public constructor(
public total: number,
Expand Down
2 changes: 0 additions & 2 deletions src/models/httpVariableResolveResult.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

export type ResolveResult = { state: ResolveState.Success, value: any }
| { state: ResolveState.Warning, value?: any, message: ResolveWarningMessage }
| { state: ResolveState.Error, message: ResolveErrorMessage };
Expand Down
2 changes: 0 additions & 2 deletions src/models/logLevel.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

export enum LogLevel {
Verbose,
Info,
Expand Down
2 changes: 0 additions & 2 deletions src/models/mime.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

export class MIME {
public constructor(public type: string, public suffix: string, public raw: string, public charset?: string) {
}
Expand Down
2 changes: 0 additions & 2 deletions src/models/previewOption.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

export enum PreviewOption {
Full,
Headers,
Expand Down
2 changes: 0 additions & 2 deletions src/models/requestParserFactory.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import { CurlRequestParser } from '../utils/curlRequestParser';
import { HttpRequestParser } from '../utils/httpRequestParser';
import { IRequestParser } from './IRequestParser';
Expand Down
2 changes: 0 additions & 2 deletions src/models/requestVariableCacheKey.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

export class RequestVariableCacheKey {
public constructor(
public key: string,
Expand Down
2 changes: 0 additions & 2 deletions src/models/requestVariableCacheValue.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import { HttpRequest } from "./httpRequest";
import { HttpResponse } from "./httpResponse";

Expand Down
2 changes: 0 additions & 2 deletions src/models/requestVariableEvent.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import { RequestVariableCacheKey } from "./requestVariableCacheKey";

export interface RequestVariableEvent {
Expand Down
2 changes: 0 additions & 2 deletions src/models/variableType.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

export enum VariableType {
Environment,
File,
Expand Down
2 changes: 0 additions & 2 deletions src/providers/customVariableDiagnosticsProvider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import { Diagnostic, DiagnosticCollection, DiagnosticSeverity, languages, Position, Range, TextDocument, workspace } from 'vscode';
import * as Constants from '../common/constants';
import { ResolveState } from '../models/httpVariableResolveResult';
Expand Down
2 changes: 0 additions & 2 deletions src/providers/documentLinkProvider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import * as fs from 'fs-extra';
import * as path from 'path';
import * as url from 'url';
Expand Down
2 changes: 0 additions & 2 deletions src/providers/environmentOrFileVariableHoverProvider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import { CancellationToken, Hover, HoverProvider, MarkdownString, MarkedString, Position, TextDocument } from 'vscode';
import { EnvironmentVariableProvider } from '../utils/httpVariableProviders/environmentVariableProvider';
import { FileVariableProvider } from '../utils/httpVariableProviders/fileVariableProvider';
Expand Down
2 changes: 0 additions & 2 deletions src/providers/fileVariableDefinitionProvider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import { CancellationToken, Definition, DefinitionProvider, Location, Position, TextDocument } from 'vscode';
import * as Constants from '../common/constants';
import { VariableUtility } from '../utils/variableUtility';
Expand Down
2 changes: 0 additions & 2 deletions src/providers/fileVariableReferenceProvider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import { CancellationToken, Location, Position, Range, ReferenceContext, ReferenceProvider, TextDocument } from 'vscode';
import * as Constants from '../common/constants';
import { VariableUtility } from '../utils/variableUtility';
Expand Down
2 changes: 0 additions & 2 deletions src/providers/fileVariableReferencesCodeLensProvider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import { CancellationToken, CodeLens, CodeLensProvider, Command, Location, Range, TextDocument } from 'vscode';
import * as Constants from '../common/constants';
import { Selector } from '../utils/selector';
Expand Down
2 changes: 0 additions & 2 deletions src/providers/httpCodeLensProvider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import { CancellationToken, CodeLens, CodeLensProvider, Command, Range, TextDocument } from 'vscode';
import * as Constants from '../common/constants';
import { Selector } from '../utils/selector';
Expand Down
2 changes: 0 additions & 2 deletions src/providers/httpCompletionItemProvider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import { CancellationToken, CompletionItem, CompletionItemKind, CompletionItemProvider, Position, TextDocument } from 'vscode';
import { ElementType } from '../models/httpElement';
import { HttpElementFactory } from '../utils/httpElementFactory';
Expand Down
2 changes: 0 additions & 2 deletions src/providers/httpDocumentSymbolProvider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import { EOL } from 'os';
import * as url from 'url';
import { CancellationToken, DocumentSymbolProvider, Location, Range, SymbolInformation, SymbolKind, TextDocument, window } from 'vscode';
Expand Down
2 changes: 0 additions & 2 deletions src/providers/requestVariableCompletionItemProvider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import { CancellationToken, CompletionItem, CompletionItemKind, CompletionItemProvider, MarkdownString, Position, Range, TextDocument, TextLine } from 'vscode';
import * as Constants from "../common/constants";
import { ElementType } from "../models/httpElement";
Expand Down
2 changes: 0 additions & 2 deletions src/providers/requestVariableDefinitionProvider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import { CancellationToken, Definition, DefinitionProvider, Location, Position, TextDocument } from 'vscode';
import * as Constants from '../common/constants';
import { VariableUtility } from '../utils/variableUtility';
Expand Down
2 changes: 0 additions & 2 deletions src/providers/requestVariableHoverProvider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import { CancellationToken, Hover, HoverProvider, MarkdownString, MarkedString, Position, Range, TextDocument, TextLine } from 'vscode';
import { RequestVariableProvider } from '../utils/httpVariableProviders/requestVariableProvider';
import { VariableUtility } from '../utils/variableUtility';
Expand Down
2 changes: 0 additions & 2 deletions src/utils/aadTokenCache.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import * as adal from 'adal-node';

export class AadTokenCache {
Expand Down
2 changes: 0 additions & 2 deletions src/utils/auth/digest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import * as stream from 'stream';
import * as url from 'url';
import { md5 } from '../misc';
Expand Down
2 changes: 0 additions & 2 deletions src/utils/curlRequestParser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import * as fs from 'fs-extra';
import * as path from 'path';
import { Uri } from 'vscode';
Expand Down
2 changes: 0 additions & 2 deletions src/utils/decorator.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import { Telemetry } from './telemetry';

export function trace(eventName: string): MethodDecorator {
Expand Down
2 changes: 0 additions & 2 deletions src/utils/dependentRegistration.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import { Disposable } from 'vscode';
import { RestClientSettings } from '../models/configurationSettings';

Expand Down
2 changes: 0 additions & 2 deletions src/utils/httpClient.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import * as fs from 'fs-extra';
import * as iconv from 'iconv-lite';
import * as path from 'path';
Expand Down
2 changes: 0 additions & 2 deletions src/utils/httpElementFactory.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import * as url from 'url';
import { MarkdownString, SnippetString, TextDocument } from 'vscode';
import * as Constants from '../common/constants';
Expand Down
2 changes: 0 additions & 2 deletions src/utils/httpRequestParser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import * as fs from 'fs-extra';
import { EOL } from 'os';
import * as path from 'path';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import * as Constants from '../../common/constants';
import { EnvironmentController } from '../../controllers/environmentController';
import { RestClientSettings } from '../../models/configurationSettings';
Expand Down
2 changes: 0 additions & 2 deletions src/utils/httpVariableProviders/fileVariableProvider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import { TextDocument } from 'vscode';
import * as Constants from '../../common/constants';
import { ResolveErrorMessage } from '../../models/httpVariableResolveResult';
Expand Down
2 changes: 0 additions & 2 deletions src/utils/httpVariableProviders/httpVariableProvider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import { TextDocument } from "vscode";
import { RequestVariableCacheValue } from '../../models/requestVariableCacheValue';
import { VariableType } from "../../models/variableType";
Expand Down
2 changes: 0 additions & 2 deletions src/utils/httpVariableProviders/requestVariableProvider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import { TextDocument } from 'vscode';
import * as Constants from '../../common/constants';
import { ResolveErrorMessage, ResolveResult, ResolveState, ResolveWarningMessage } from '../../models/httpVariableResolveResult';
Expand Down
2 changes: 0 additions & 2 deletions src/utils/httpVariableProviders/systemVariableProvider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import * as adal from 'adal-node';
import * as dotenv from 'dotenv';
import * as fs from 'fs-extra';
Expand Down
2 changes: 0 additions & 2 deletions src/utils/mimeUtility.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import { RestClientSettings } from '../models/configurationSettings';
import { MIME } from '../models/mime';

Expand Down
2 changes: 0 additions & 2 deletions src/utils/misc.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import * as crypto from 'crypto';
import { RequestHeaders, RequestHeaderValue, ResponseHeaders, ResponseHeaderValue } from '../models/base';

Expand Down
2 changes: 0 additions & 2 deletions src/utils/persistUtility.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import * as fs from 'fs-extra';
import * as os from 'os';
import * as path from 'path';
Expand Down
2 changes: 0 additions & 2 deletions src/utils/requestParserUtil.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import { RequestHeaders } from "../models/base";

export class RequestParserUtil {
Expand Down
2 changes: 0 additions & 2 deletions src/utils/requestStore.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import { HttpRequest } from '../models/httpRequest';

export class RequestStore {
Expand Down
2 changes: 0 additions & 2 deletions src/utils/requestVariableCache.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import { Event, EventEmitter } from "vscode";
import { RequestVariableCacheKey } from "../models/requestVariableCacheKey";
import { RequestVariableCacheValue } from '../models/requestVariableCacheValue';
Expand Down
2 changes: 0 additions & 2 deletions src/utils/requestVariableCacheValueProcessor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import { HttpRequest } from "../models/httpRequest";
import { HttpResponse } from '../models/httpResponse';
import { ResolveErrorMessage, ResolveResult, ResolveState, ResolveWarningMessage } from "../models/httpVariableResolveResult";
Expand Down
2 changes: 0 additions & 2 deletions src/utils/responseFormatUtility.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import { createScanner, SyntaxKind } from 'jsonc-parser';
import * as os from 'os';
import { window } from 'vscode';
Expand Down
2 changes: 0 additions & 2 deletions src/utils/selector.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";

import { EOL } from 'os';
import { Range, TextEditor } from 'vscode';
import * as Constants from '../common/constants';
Expand Down
2 changes: 0 additions & 2 deletions src/utils/telemetry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import * as appInsights from "applicationinsights";
import packageLockJson from '../../package-lock.json';
import packageJson from '../../package.json';
Expand Down
2 changes: 0 additions & 2 deletions src/utils/variableProcessor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import { TextDocument } from 'vscode';
import { VariableType } from "../models/variableType";
import { EnvironmentVariableProvider } from './httpVariableProviders/environmentVariableProvider';
Expand Down
2 changes: 0 additions & 2 deletions src/utils/variableUtility.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import { Position, Range, TextDocument, TextLine } from 'vscode';
import * as Constants from '../common/constants';

Expand Down
Loading

0 comments on commit d47bc09

Please sign in to comment.