mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-17 01:35:37 -05:00
Adds more linting rules
Fixes lint issues
This commit is contained in:
@@ -72,8 +72,8 @@ export class GitContextTracker extends Disposable {
|
||||
if (!TextDocumentComparer.equals(this._editor && this._editor.document, e && e.document)) return;
|
||||
|
||||
// Can't unsubscribe here because undo doesn't trigger any other event
|
||||
//this._unsubscribeToDocumentChanges();
|
||||
//this.updateBlameability(false);
|
||||
// this._unsubscribeToDocumentChanges();
|
||||
// this.updateBlameability(false);
|
||||
|
||||
// We have to defer because isDirty is not reliable inside this event
|
||||
setTimeout(() => this._updateBlameability(!e.document.isDirty), 1);
|
||||
@@ -83,7 +83,7 @@ export class GitContextTracker extends Disposable {
|
||||
if (!TextDocumentComparer.equals(this._editor && this._editor.document, e)) return;
|
||||
|
||||
// Don't need to resubscribe as we aren't unsubscribing on document changes anymore
|
||||
//this._subscribeToDocumentChanges();
|
||||
// this._subscribeToDocumentChanges();
|
||||
this._updateBlameability(!e.isDirty);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
import { Uri } from 'vscode';
|
||||
import { GitCommit, GitCommitType, IGitCommitLine } from './commit';
|
||||
import { IGitStatusFile, GitStatusFileStatus } from './status';
|
||||
import { GitStatusFileStatus, IGitStatusFile } from './status';
|
||||
import * as path from 'path';
|
||||
|
||||
export class GitLogCommit extends GitCommit {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
import { IGitCommitLine } from './commit';
|
||||
import { GitLogCommit } from './logCommit';
|
||||
import { IGitStatusFile, GitStatusFileStatus } from './status';
|
||||
import { GitStatusFileStatus, IGitStatusFile } from './status';
|
||||
|
||||
export class GitStashCommit extends GitLogCommit {
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ export class GitBlameParser {
|
||||
let entry: IBlameEntry | undefined = undefined;
|
||||
let position = -1;
|
||||
while (++position < lines.length) {
|
||||
let lineParts = lines[position].split(' ');
|
||||
const lineParts = lines[position].split(' ');
|
||||
if (lineParts.length < 2) {
|
||||
continue;
|
||||
}
|
||||
@@ -122,7 +122,7 @@ export class GitBlameParser {
|
||||
|
||||
const authors: Map<string, IGitAuthor> = new Map();
|
||||
const commits: Map<string, GitCommit> = new Map();
|
||||
const lines: Array<IGitCommitLine> = [];
|
||||
const lines: IGitCommitLine[] = [];
|
||||
|
||||
let relativeFileName = repoPath && fileName;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
import { Range } from 'vscode';
|
||||
import { Git, GitStatusFileStatus, GitLogCommit, GitCommitType, IGitAuthor, IGitLog, IGitStatusFile } from './../git';
|
||||
import { Git, GitCommitType, GitLogCommit, GitStatusFileStatus, IGitAuthor, IGitLog, IGitStatusFile } from './../git';
|
||||
// import { Logger } from '../../logger';
|
||||
import * as moment from 'moment';
|
||||
import * as path from 'path';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
import { Git, GitStatusFileStatus, GitStatusFile, IGitStatus } from './../git';
|
||||
import { Git, GitStatusFile, GitStatusFileStatus, IGitStatus } from './../git';
|
||||
|
||||
interface IFileStatusEntry {
|
||||
staged: boolean;
|
||||
@@ -61,7 +61,7 @@ export class GitStatusParser {
|
||||
else {
|
||||
let entry: IFileStatusEntry;
|
||||
const rawStatus = line.substring(0, 2);
|
||||
let fileName = line.substring(3);
|
||||
const fileName = line.substring(3);
|
||||
if (rawStatus[0] === 'R') {
|
||||
const [file1, file2] = fileName.replace(/\"/g, '').split('->');
|
||||
entry = this._parseFileEntry(rawStatus, file2.trim(), file1.trim());
|
||||
@@ -98,7 +98,7 @@ export class GitStatusParser {
|
||||
}
|
||||
}
|
||||
else {
|
||||
let lineParts = line.split(' ');
|
||||
const lineParts = line.split(' ');
|
||||
let entry: IFileStatusEntry | undefined = undefined;
|
||||
switch (lineParts[0][0]) {
|
||||
case '1': // normal
|
||||
|
||||
@@ -21,7 +21,7 @@ export class BitbucketService extends RemoteProvider {
|
||||
}
|
||||
|
||||
protected getUrlForFile(fileName: string, branch?: string, sha?: string, range?: Range): string {
|
||||
let line: string = '';
|
||||
let line = '';
|
||||
if (range) {
|
||||
if (range.start.line === range.end.line) {
|
||||
line = `#${fileName}-${range.start.line}`;
|
||||
|
||||
@@ -21,7 +21,7 @@ export class GitHubService extends RemoteProvider {
|
||||
}
|
||||
|
||||
protected getUrlForFile(fileName: string, branch?: string, sha?: string, range?: Range): string {
|
||||
let line: string = '';
|
||||
let line = '';
|
||||
if (range) {
|
||||
if (range.start.line === range.end.line) {
|
||||
line = `#L${range.start.line}`;
|
||||
|
||||
@@ -21,7 +21,7 @@ export class VisualStudioService extends RemoteProvider {
|
||||
}
|
||||
|
||||
protected getUrlForFile(fileName: string, branch?: string, sha?: string, range?: Range): string {
|
||||
let line: string = '';
|
||||
let line = '';
|
||||
if (range) {
|
||||
if (range.start.line === range.end.line) {
|
||||
line = `&line=${range.start.line}`;
|
||||
|
||||
Reference in New Issue
Block a user