Explorar el Código

Fixes lint issues

main
Eric Amodio hace 4 años
padre
commit
4d3a433430
Se han modificado 10 ficheros con 14 adiciones y 19 borrados
  1. +1
    -1
      src/annotations/autolinks.ts
  2. +1
    -1
      src/annotations/fileAnnotationController.ts
  3. +1
    -1
      src/codelens/codeLensProvider.ts
  4. +1
    -1
      src/git/formatters/commitFormatter.ts
  5. +1
    -1
      src/trackers/documentTracker.ts
  6. +1
    -1
      src/trackers/trackedDocument.ts
  7. +1
    -1
      src/views/viewBase.ts
  8. +3
    -8
      src/vsls/vsls.ts
  9. +2
    -2
      src/webviews/apps/shared/events.ts
  10. +2
    -2
      src/webviews/webviewBase.ts

+ 1
- 1
src/annotations/autolinks.ts Ver fichero

@ -40,7 +40,7 @@ export class Autolinks implements Disposable {
}
dispose() {
this._disposable && this._disposable.dispose();
this._disposable?.dispose();
}
private onConfigurationChanged(e: ConfigurationChangeEvent) {

+ 1
- 1
src/annotations/fileAnnotationController.ts Ver fichero

@ -454,7 +454,7 @@ export class FileAnnotationController implements Disposable {
if (this._annotationProviders.size === 0) {
Logger.log('Remove all listener registrations for annotations');
this._annotationsDisposable && this._annotationsDisposable.dispose();
this._annotationsDisposable?.dispose();
this._annotationsDisposable = undefined;
}

+ 1
- 1
src/codelens/codeLensProvider.ts Ver fichero

@ -57,7 +57,7 @@ export class GitRecentChangeCodeLens extends CodeLens {
}
getBlame(): GitBlameLines | undefined {
return this.blame && this.blame();
return this.blame?.();
}
}

+ 1
- 1
src/git/formatters/commitFormatter.ts Ver fichero

@ -414,7 +414,7 @@ export class CommitFormatter extends Formatter {
}
get tips() {
const branchAndTagTips = this._options.getBranchAndTagTips && this._options.getBranchAndTagTips(this._item.sha);
const branchAndTagTips = this._options.getBranchAndTagTips?.(this._item.sha);
if (branchAndTagTips == null) return emptyStr;
return this._padOrTruncate(branchAndTagTips, this._options.tokenOptions.tips);

+ 1
- 1
src/trackers/documentTracker.ts Ver fichero

@ -80,7 +80,7 @@ export class DocumentTracker implements Disposable {
}
dispose() {
this._disposable && this._disposable.dispose();
this._disposable?.dispose();
this.clear();
}

+ 1
- 1
src/trackers/trackedDocument.ts Ver fichero

@ -38,7 +38,7 @@ export class TrackedDocument implements Disposable {
dispose() {
this._disposed = true;
this.reset('dispose');
this._disposable && this._disposable.dispose();
this._disposable?.dispose();
}
private async initialize(uri: Uri): Promise<Repository | undefined> {

+ 1
- 1
src/views/viewBase.ts Ver fichero

@ -82,7 +82,7 @@ export abstract class ViewBase> implements TreeData
}
dispose() {
this._disposable && this._disposable.dispose();
this._disposable?.dispose();
}
getQualifiedCommand(command: string) {

+ 3
- 8
src/vsls/vsls.ts Ver fichero

@ -47,14 +47,9 @@ export class VslsController implements Disposable {
}
dispose() {
this._disposable && this._disposable.dispose();
if (this._host !== undefined) {
this._host.dispose();
}
if (this._guest !== undefined) {
this._guest.dispose();
}
this._disposable?.dispose();
this._host?.dispose();
this._guest?.dispose();
}
private async initialize() {

+ 2
- 2
src/webviews/apps/shared/events.ts Ver fichero

@ -58,7 +58,7 @@ export class Emitter {
this._options.onFirstListenerDidAdd(this);
}
if (this._options && this._options.onListenerDidAdd) {
if (this._options?.onListenerDidAdd) {
this._options.onListenerDidAdd(this, listener, thisArgs);
}
@ -67,7 +67,7 @@ export class Emitter {
result.dispose = Emitter._noop;
if (!this._disposed) {
remove();
if (this._options && this._options.onLastListenerRemove) {
if (this._options?.onLastListenerRemove) {
const hasListeners = this._listeners && !this._listeners.isEmpty();
if (!hasListeners) {
this._options.onLastListenerRemove(this);

+ 2
- 2
src/webviews/webviewBase.ts Ver fichero

@ -63,7 +63,7 @@ export abstract class WebviewBase implements Disposable {
dispose() {
this.disposable.dispose();
this._disposablePanel && this._disposablePanel.dispose();
this._disposablePanel?.dispose();
}
protected onShowCommand() {
@ -75,7 +75,7 @@ export abstract class WebviewBase implements Disposable {
}
private onPanelDisposed() {
this._disposablePanel && this._disposablePanel.dispose();
this._disposablePanel?.dispose();
this._panel = undefined;
}

Cargando…
Cancelar
Guardar