mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-19 08:51:24 +00:00
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:
@@ -142,7 +142,7 @@ export const QueryResultSection: React.FC<QueryResultProps> = ({
|
||||
// for IE and Edge
|
||||
navigator.msSaveBlob(
|
||||
new Blob([csvData], { type: "data:text/csv;charset=utf-8" }),
|
||||
"PerPartitionQueryMetrics.csv"
|
||||
"PerPartitionQueryMetrics.csv",
|
||||
);
|
||||
} else {
|
||||
const downloadLink: HTMLAnchorElement = document.createElement("a");
|
||||
@@ -329,7 +329,7 @@ export const QueryResultSection: React.FC<QueryResultProps> = ({
|
||||
metric: "Document write time",
|
||||
value: `${aggregatedQueryMetrics.documentWriteTime.toString() || 0} ms`,
|
||||
toolTip: "Time spent to write query result set to response buffer",
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,10 @@ export class NewQueryTab extends TabsBase {
|
||||
public iQueryTabComponentProps: IQueryTabComponentProps;
|
||||
public iTabAccessor: ITabAccessor;
|
||||
|
||||
constructor(options: QueryTabOptions, private props: IQueryTabProps) {
|
||||
constructor(
|
||||
options: QueryTabOptions,
|
||||
private props: IQueryTabProps,
|
||||
) {
|
||||
super(options);
|
||||
this.partitionKey = options.partitionKey;
|
||||
this.iQueryTabComponentProps = {
|
||||
|
||||
@@ -14,7 +14,7 @@ describe("QueryTabComponent", () => {
|
||||
beforeEach(() => jest.clearAllMocks());
|
||||
|
||||
it("should launch Copilot when ALT+C is pressed", () => {
|
||||
const propsMock: Readonly<IQueryTabComponentProps> = ({
|
||||
const propsMock: Readonly<IQueryTabComponentProps> = {
|
||||
collection: { databaseId: "CopilotSampleDb" },
|
||||
onTabAccessor: () => jest.fn(),
|
||||
isExecutionError: false,
|
||||
@@ -22,7 +22,7 @@ describe("QueryTabComponent", () => {
|
||||
tabsBaseInstance: {
|
||||
updateNavbarWithTabsButtons: () => jest.fn(),
|
||||
},
|
||||
} as unknown) as IQueryTabComponentProps;
|
||||
} as unknown as IQueryTabComponentProps;
|
||||
|
||||
const { container } = render(<QueryTabComponent {...propsMock} />);
|
||||
|
||||
|
||||
@@ -219,13 +219,13 @@ export default class QueryTabComponent extends React.Component<IQueryTabComponen
|
||||
? queryIterator(
|
||||
this.props.collection.databaseId,
|
||||
this.props.viewModelcollection,
|
||||
this.state.selectedContent || this.state.sqlQueryEditorContent
|
||||
this.state.selectedContent || this.state.sqlQueryEditorContent,
|
||||
)
|
||||
: queryDocuments(
|
||||
this.props.collection.databaseId,
|
||||
this.props.collection.id(),
|
||||
this.state.selectedContent || this.state.sqlQueryEditorContent,
|
||||
{ enableCrossPartitionQuery: HeadersUtility.shouldEnableCrossPartitionKey() } as FeedOptions
|
||||
{ enableCrossPartitionQuery: HeadersUtility.shouldEnableCrossPartitionKey() } as FeedOptions,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@ export default class QueryTabComponent extends React.Component<IQueryTabComponen
|
||||
try {
|
||||
const queryResults: ViewModels.QueryResults = await QueryUtils.queryPagesUntilContentPresent(
|
||||
firstItemIndex,
|
||||
queryDocuments
|
||||
queryDocuments,
|
||||
);
|
||||
this.setState({ queryResults, error: "" });
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user