removed unused-variables and disabled tslint rule if needed
This commit is contained in:
parent
19294a32fc
commit
e79e8e0486
|
@ -7,7 +7,7 @@
|
|||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
import * as vscode from 'vscode';
|
||||
import { getLocation, visit, parse, ParseError, ParseErrorCode } from 'jsonc-parser';
|
||||
import { getLocation, visit, parse, ParseErrorCode } from 'jsonc-parser';
|
||||
import * as path from 'path';
|
||||
import { SettingsDocument } from './settingsDocumentHelper';
|
||||
|
||||
|
@ -18,7 +18,6 @@ const decoration = vscode.window.createTextEditorDecorationType({
|
|||
let pendingLaunchJsonDecoration: NodeJS.Timer;
|
||||
|
||||
export function activate(context: vscode.ExtensionContext): void {
|
||||
|
||||
//keybindings.json command-suggestions
|
||||
context.subscriptions.push(registerKeybindingsCompletions());
|
||||
|
||||
|
@ -70,7 +69,6 @@ function autoFixSettingsJSON(willSaveEvent: vscode.TextDocumentWillSaveEvent): v
|
|||
|
||||
onError(error: ParseErrorCode, offset: number, length: number): void {
|
||||
if (error === ParseErrorCode.CommaExpected && lastEndOfSomething > -1) {
|
||||
const errorPosition = document.positionAt(offset);
|
||||
|
||||
const fixPosition = document.positionAt(lastEndOfSomething);
|
||||
edit.insert(document.uri, fixPosition, ',');
|
||||
|
@ -106,6 +104,7 @@ function registerSettingsCompletions(): vscode.Disposable {
|
|||
});
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:no-unused-variable
|
||||
function provideContributedLocalesProposals(range: vscode.Range): vscode.ProviderResult<vscode.CompletionItem[] | vscode.CompletionList> {
|
||||
const contributedLocales: string[] = [];
|
||||
for (const extension of vscode.extensions.all) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
'use strict';
|
||||
|
||||
import { Model } from './model';
|
||||
import { SourceControlInputBox, Uri } from 'vscode';
|
||||
import { Uri } from 'vscode';
|
||||
|
||||
export interface InputBox {
|
||||
value: string;
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
|
||||
import { Uri, commands, Disposable, window, workspace, QuickPickItem, OutputChannel, Range, WorkspaceEdit, Position, LineChange, SourceControlResourceState, TextDocumentShowOptions, ViewColumn, ProgressLocation, TextEditor, CancellationTokenSource, StatusBarAlignment } from 'vscode';
|
||||
import { Ref, RefType, Git, GitErrorCodes, Branch } from './git';
|
||||
import { Repository, Resource, Status, CommitOptions, ResourceGroupType, RepositoryState } from './repository';
|
||||
import { Repository, Resource, Status, CommitOptions, ResourceGroupType } from './repository';
|
||||
import { Model } from './model';
|
||||
import { toGitUri, fromGitUri } from './uri';
|
||||
import { grep, eventToPromise, isDescendant } from './util';
|
||||
import { grep, isDescendant } from './util';
|
||||
import { applyLineChanges, intersectDiffWithRange, toLineRanges, invertLineChange, getModifiedRange } from './staging';
|
||||
import * as path from 'path';
|
||||
import { lstat, Stats } from 'fs';
|
||||
|
@ -237,7 +237,7 @@ export class CommandCenter {
|
|||
}
|
||||
|
||||
const { size, object } = await repository.lstree(gitRef, uri.fsPath);
|
||||
const { mimetype, encoding } = await repository.detectObjectType(object);
|
||||
const { mimetype } = await repository.detectObjectType(object);
|
||||
|
||||
if (mimetype === 'text/plain') {
|
||||
return toGitUri(uri, ref);
|
||||
|
@ -1051,6 +1051,7 @@ export class CommandCenter {
|
|||
value = (await repository.getCommit(repository.HEAD.commit)).message;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:no-unused-variable
|
||||
const getPreviousCommitMessage = async () => {
|
||||
//Only return the previous commit message if it's an amend commit and the repo already has a commit
|
||||
if (opts && opts.amend && repository.HEAD && repository.HEAD.commit) {
|
||||
|
|
|
@ -10,8 +10,8 @@ import * as path from 'path';
|
|||
import { Repository, GitResourceGroup, Status } from './repository';
|
||||
import { Model } from './model';
|
||||
import { debounce } from './decorators';
|
||||
import { filterEvent, dispose, anyEvent, mapEvent, fireEvent } from './util';
|
||||
import { Submodule, GitErrorCodes } from './git';
|
||||
import { filterEvent, dispose, anyEvent, fireEvent } from './util';
|
||||
import { GitErrorCodes } from './git';
|
||||
|
||||
type Callback = { resolve: (status: boolean) => void, reject: (err: any) => void };
|
||||
|
||||
|
|
|
@ -78,6 +78,7 @@ function _throttle<T>(fn: Function, key: string): Function {
|
|||
|
||||
export const throttle = decorate(_throttle);
|
||||
|
||||
// tslint:disable-next-line:no-unused-variable
|
||||
function _sequentialize<T>(fn: Function, key: string): Function {
|
||||
const currentKey = `__$sequence$${key}`;
|
||||
|
||||
|
|
|
@ -362,6 +362,7 @@ function getGitErrorCode(stderr: string): string | undefined {
|
|||
export class Git {
|
||||
|
||||
private gitPath: string;
|
||||
// tslint:disable-next-line:no-unused-variable
|
||||
private version: string;
|
||||
private env: any;
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import { CommandCenter } from './commands';
|
|||
import { GitContentProvider } from './contentProvider';
|
||||
import { GitDecorations } from './decorationProvider';
|
||||
import { Askpass } from './askpass';
|
||||
import { toDisposable, filterEvent, mapEvent, eventToPromise } from './util';
|
||||
import { toDisposable, filterEvent, eventToPromise } from './util';
|
||||
import TelemetryReporter from 'vscode-extension-telemetry';
|
||||
import { API, createApi } from './api';
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import { workspace, WorkspaceFoldersChangeEvent, Uri, window, Event, EventEmitter, QuickPickItem, Disposable, SourceControl, SourceControlResourceGroup, TextEditor, Memento, ConfigurationChangeEvent } from 'vscode';
|
||||
import { workspace, WorkspaceFoldersChangeEvent, Uri, window, Event, EventEmitter, QuickPickItem, Disposable, SourceControl, SourceControlResourceGroup, TextEditor, Memento } from 'vscode';
|
||||
import { Repository, RepositoryState } from './repository';
|
||||
import { memoize, sequentialize, debounce } from './decorators';
|
||||
import { dispose, anyEvent, filterEvent, IDisposable, isDescendant, find, firstIndex } from './util';
|
||||
import { dispose, anyEvent, filterEvent, isDescendant, firstIndex } from './util';
|
||||
import { Git, GitErrorCodes } from './git';
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
|
|
|
@ -398,6 +398,7 @@ class ProgressManager {
|
|||
|
||||
private disposable: IDisposable = EmptyDisposable;
|
||||
|
||||
// tslint:disable-next-line:no-unused-variable
|
||||
constructor(private repository: Repository) {
|
||||
const start = onceEvent(filterEvent(repository.onDidChangeOperations, () => repository.operations.shouldShowProgress()));
|
||||
const end = onceEvent(filterEvent(debounceEvent(repository.onDidChangeOperations, 300), () => !repository.operations.shouldShowProgress()));
|
||||
|
@ -791,6 +792,7 @@ export class Repository implements Disposable {
|
|||
return await this.run(Operation.Show, async () => {
|
||||
const relativePath = path.relative(this.repository.root, filePath).replace(/\\/g, '/');
|
||||
const configFiles = workspace.getConfiguration('files', Uri.file(filePath));
|
||||
// tslint:disable-next-line:no-unused-variable
|
||||
const encoding = configFiles.get<string>('encoding');
|
||||
|
||||
// TODO@joao: REsource config api
|
||||
|
@ -1009,6 +1011,7 @@ export class Repository implements Disposable {
|
|||
case 'UU': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.BOTH_MODIFIED, useIcons));
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:no-unused-variable
|
||||
let isModifiedInIndex = false;
|
||||
|
||||
switch (raw.x) {
|
||||
|
|
Loading…
Reference in a new issue