Update prettier to latest. Remove tslint (#1641)

* Rev up prettier

* Reformat

* Remove deprecated tslint

* Remove call to tslint and update package-lock.json
This commit is contained in:
Laurent Nguyen
2023-10-03 15:13:24 +00:00
committed by GitHub
parent e3c168b7be
commit 90c1439d34
311 changed files with 1899 additions and 2194 deletions

View File

@@ -88,7 +88,7 @@ export default class DocumentsTab extends TabsBase {
this.documentContentsGridId = `documentContentsGrid${this.tabId}`;
this.documentContentsContainerId = `documentContentsContainer${this.tabId}`;
this.editorState = ko.observable<ViewModels.DocumentExplorerState>(
ViewModels.DocumentExplorerState.noDocumentSelected
ViewModels.DocumentExplorerState.noDocumentSelected,
);
this.selectedDocumentId = ko.observable<DocumentId>();
this.selectedDocumentContent = editable.observable<string>("");
@@ -99,7 +99,7 @@ export default class DocumentsTab extends TabsBase {
this.partitionKeyPropertyHeaders = this.collection?.partitionKeyPropertyHeaders || this.partitionKey?.paths;
this.partitionKeyProperties = this.partitionKeyPropertyHeaders?.map((partitionKeyPropertyHeader) =>
partitionKeyPropertyHeader.replace(/[/]+/g, ".").substring(1).replace(/[']+/g, "")
partitionKeyPropertyHeader.replace(/[/]+/g, ".").substring(1).replace(/[']+/g, ""),
);
this.isFilterExpanded = ko.observable<boolean>(false);
@@ -134,20 +134,20 @@ export default class DocumentsTab extends TabsBase {
this.accessibleDocumentList = new AccessibleVerticalList(this.documentIds());
this.accessibleDocumentList.setOnSelect(
(selectedDocument: DocumentId) => selectedDocument && selectedDocument.click()
(selectedDocument: DocumentId) => selectedDocument && selectedDocument.click(),
);
this.selectedDocumentId.subscribe((newSelectedDocumentId: DocumentId) =>
this.accessibleDocumentList.updateCurrentItem(newSelectedDocumentId)
this.accessibleDocumentList.updateCurrentItem(newSelectedDocumentId),
);
this.documentIds.subscribe((newDocuments: DocumentId[]) => {
this.accessibleDocumentList.updateItemList(newDocuments);
if (newDocuments.length > 0) {
this.dataContentsGridScrollHeight(
newDocuments.length * DocumentsGridMetrics.IndividualRowHeight + DocumentsGridMetrics.BufferHeight + "px"
newDocuments.length * DocumentsGridMetrics.IndividualRowHeight + DocumentsGridMetrics.BufferHeight + "px",
);
} else {
this.dataContentsGridScrollHeight(
DocumentsGridMetrics.IndividualRowHeight + DocumentsGridMetrics.BufferHeight + "px"
DocumentsGridMetrics.IndividualRowHeight + DocumentsGridMetrics.BufferHeight + "px",
);
}
});
@@ -421,7 +421,7 @@ export default class DocumentsTab extends TabsBase {
"OK",
() => this.initializeNewDocument(),
"Cancel",
undefined
undefined,
);
} else {
this.initializeNewDocument();
@@ -452,7 +452,7 @@ export default class DocumentsTab extends TabsBase {
this.initialDocumentContent(value);
const partitionKeyValueArray = extractPartitionKey(
savedDocument,
this.partitionKey as PartitionKeyDefinition
this.partitionKey as PartitionKeyDefinition,
);
let id = new DocumentId(this, savedDocument, partitionKeyValueArray);
let ids = this.documentIds();
@@ -467,7 +467,7 @@ export default class DocumentsTab extends TabsBase {
dataExplorerArea: Constants.Areas.Tab,
tabTitle: this.tabTitle(),
},
startKey
startKey,
);
},
(error) => {
@@ -482,9 +482,9 @@ export default class DocumentsTab extends TabsBase {
error: errorMessage,
errorStack: getErrorStack(error),
},
startKey
startKey,
);
}
},
)
.finally(() => this.isExecuting(false));
};
@@ -528,7 +528,7 @@ export default class DocumentsTab extends TabsBase {
dataExplorerArea: Constants.Areas.Tab,
tabTitle: this.tabTitle(),
},
startKey
startKey,
);
},
(error) => {
@@ -543,9 +543,9 @@ export default class DocumentsTab extends TabsBase {
error: errorMessage,
errorStack: getErrorStack(error),
},
startKey
startKey,
);
}
},
)
.finally(() => this.isExecuting(false));
};
@@ -572,7 +572,7 @@ export default class DocumentsTab extends TabsBase {
"Delete",
async () => await this._deleteDocument(selectedDocumentId),
"Cancel",
undefined
undefined,
);
};
@@ -634,7 +634,7 @@ export default class DocumentsTab extends TabsBase {
error: getErrorMessage(error),
errorStack: getErrorStack(error),
},
this.onLoadStartKey
this.onLoadStartKey,
);
this.onLoadStartKey = null;
}
@@ -666,7 +666,7 @@ export default class DocumentsTab extends TabsBase {
dataExplorerArea: Constants.Areas.Tab,
tabTitle: this.tabTitle(),
},
startKey
startKey,
);
},
(error) => {
@@ -680,9 +680,9 @@ export default class DocumentsTab extends TabsBase {
error: getErrorMessage(error),
errorStack: getErrorStack(error),
},
startKey
startKey,
);
}
},
)
.finally(() => this.isExecuting(false));
}
@@ -741,7 +741,7 @@ export default class DocumentsTab extends TabsBase {
dataExplorerArea: Constants.Areas.Tab,
tabTitle: this.tabTitle(),
},
this.onLoadStartKey
this.onLoadStartKey,
);
this.onLoadStartKey = null;
}
@@ -762,11 +762,11 @@ export default class DocumentsTab extends TabsBase {
error: errorMessage,
errorStack: getErrorStack(error),
},
this.onLoadStartKey
this.onLoadStartKey,
);
this.onLoadStartKey = null;
}
}
},
)
.finally(() => this.isExecuting(false));
}
@@ -923,7 +923,7 @@ export default class DocumentsTab extends TabsBase {
this.discardExisitingDocumentChangesButton.enabled,
this.deleteExisitingDocumentButton.visible,
this.deleteExisitingDocumentButton.enabled,
])
]),
).subscribe(() => this.updateNavbarWithTabsButtons());
this.updateNavbarWithTabsButtons();
}