mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-16 17:25:58 +00:00
Get our previously strict files a bit tighter (#604)
Now they meet noUnusedParameters
This commit is contained in:
parent
e8b79d6260
commit
154db1dcd5
@ -22,13 +22,7 @@ export interface ReactAdapter {
|
|||||||
export class Registerer {
|
export class Registerer {
|
||||||
public static register(): void {
|
public static register(): void {
|
||||||
ko.bindingHandlers.react = {
|
ko.bindingHandlers.react = {
|
||||||
init: (
|
init: (element: any, wrappedValueAccessor: () => any) => {
|
||||||
element: any,
|
|
||||||
wrappedValueAccessor: () => any,
|
|
||||||
allBindings?: ko.AllBindings,
|
|
||||||
viewModel?: any,
|
|
||||||
bindingContext?: ko.BindingContext
|
|
||||||
) => {
|
|
||||||
const adapter: ReactAdapter = wrappedValueAccessor();
|
const adapter: ReactAdapter = wrappedValueAccessor();
|
||||||
|
|
||||||
if (adapter.setElement) {
|
if (adapter.setElement) {
|
||||||
|
@ -73,7 +73,7 @@ export class Splitter {
|
|||||||
$(this.leftSide).resizable(splitterOptions);
|
$(this.leftSide).resizable(splitterOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
private onResizeStart: JQueryUI.ResizableEvent = (e: Event, ui: JQueryUI.ResizableUIParams) => {
|
private onResizeStart: JQueryUI.ResizableEvent = () => {
|
||||||
if (this.direction === SplitterDirection.Vertical) {
|
if (this.direction === SplitterDirection.Vertical) {
|
||||||
$(".ui-resizable-helper").height("100%");
|
$(".ui-resizable-helper").height("100%");
|
||||||
} else {
|
} else {
|
||||||
@ -82,9 +82,7 @@ export class Splitter {
|
|||||||
$("iframe").css("pointer-events", "none");
|
$("iframe").css("pointer-events", "none");
|
||||||
};
|
};
|
||||||
|
|
||||||
private onResizeStop: JQueryUI.ResizableEvent = (e: Event, ui: JQueryUI.ResizableUIParams) => {
|
private onResizeStop: JQueryUI.ResizableEvent = () => $("iframe").css("pointer-events", "auto");
|
||||||
$("iframe").css("pointer-events", "auto");
|
|
||||||
};
|
|
||||||
|
|
||||||
public collapseLeft() {
|
public collapseLeft() {
|
||||||
this.lastX = $(this.splitter).position().left;
|
this.lastX = $(this.splitter).position().left;
|
||||||
|
@ -128,21 +128,21 @@ class InputTypeaheadViewModel {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
callback: {
|
callback: {
|
||||||
onClick: (node: any, a: any, item: OnClickItem, event: any) => {
|
onClick: (_node: unknown, _a: unknown, item: OnClickItem) => {
|
||||||
cache.selection = item;
|
cache.selection = item;
|
||||||
|
|
||||||
if (params.selection) {
|
if (params.selection) {
|
||||||
params.selection(item);
|
params.selection(item);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onResult(node: any, query: any, result: any, resultCount: any, resultCountPerGroup: any) {
|
onResult(_node: unknown, query: any) {
|
||||||
cache.inputValue = query;
|
cache.inputValue = query;
|
||||||
if (params.inputValue) {
|
if (params.inputValue) {
|
||||||
params.inputValue(query);
|
params.inputValue(query);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
template: (query: string, item: any) => {
|
template: (_query: string, item: any) => {
|
||||||
// Don't display id if caption *IS* the id
|
// Don't display id if caption *IS* the id
|
||||||
return item.caption === item.value
|
return item.caption === item.value
|
||||||
? "<span>{{caption}}</span>"
|
? "<span>{{caption}}</span>"
|
||||||
|
@ -11,7 +11,7 @@ let fakeAjaxResponse: AjaxResponse = {
|
|||||||
responseType: "json",
|
responseType: "json",
|
||||||
};
|
};
|
||||||
export const sessions = {
|
export const sessions = {
|
||||||
create: (serverConfig: unknown, body: object): Observable<AjaxResponse> => of(fakeAjaxResponse),
|
create: (): Observable<AjaxResponse> => of(fakeAjaxResponse),
|
||||||
__setResponse: (response: AjaxResponse) => {
|
__setResponse: (response: AjaxResponse) => {
|
||||||
fakeAjaxResponse = response;
|
fakeAjaxResponse = response;
|
||||||
},
|
},
|
||||||
|
@ -220,7 +220,7 @@ export class NotebookContentClient {
|
|||||||
return this.contentProvider
|
return this.contentProvider
|
||||||
.remove(this.getServerConfig(), path)
|
.remove(this.getServerConfig(), path)
|
||||||
.toPromise()
|
.toPromise()
|
||||||
.then((xhr: AjaxResponse) => path);
|
.then(() => path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -23,7 +23,7 @@ export class AccessibleVerticalList {
|
|||||||
this.onSelect = onSelect;
|
this.onSelect = onSelect;
|
||||||
}
|
}
|
||||||
|
|
||||||
public onKeyDown = (source: any, event: KeyboardEvent): boolean => {
|
public onKeyDown = (_src: unknown, event: KeyboardEvent): boolean => {
|
||||||
const targetContainer: Element = <Element>event.target;
|
const targetContainer: Element = <Element>event.target;
|
||||||
if (this.items == null || this.items.length === 0) {
|
if (this.items == null || this.items.length === 0) {
|
||||||
// no items so this should be a noop
|
// no items so this should be a noop
|
||||||
|
@ -2,11 +2,11 @@ import { IResourceProviderClient } from "../ResourceProvider/IResourceProviderCl
|
|||||||
import { NotebookWorkspace } from "../Contracts/DataModels";
|
import { NotebookWorkspace } from "../Contracts/DataModels";
|
||||||
|
|
||||||
export class NotebookWorkspaceSettingsProviderClient implements IResourceProviderClient<string> {
|
export class NotebookWorkspaceSettingsProviderClient implements IResourceProviderClient<string> {
|
||||||
public async deleteAsync(url: string, apiVersion: string): Promise<void> {
|
public async deleteAsync(_url: string, _apiVersion: string): Promise<void> {
|
||||||
throw new Error("Not yet implemented");
|
throw new Error("Not yet implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
public async postAsync(url: string, body: any, apiVersion: string): Promise<any> {
|
public async postAsync(_url: string, _body: any, _apiVersion: string): Promise<any> {
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
notebookServerEndpoint: "http://localhost:8888",
|
notebookServerEndpoint: "http://localhost:8888",
|
||||||
username: "",
|
username: "",
|
||||||
@ -14,37 +14,37 @@ export class NotebookWorkspaceSettingsProviderClient implements IResourceProvide
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getAsync(url: string, apiVersion: string): Promise<string> {
|
public async getAsync(): Promise<string> {
|
||||||
throw new Error("Not yet implemented");
|
throw new Error("Not yet implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
public async putAsync(url: string, body: any, apiVersion: string): Promise<string> {
|
public async putAsync(): Promise<string> {
|
||||||
throw new Error("Not yet implemented");
|
throw new Error("Not yet implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
public async patchAsync(url: string, apiVersion: string): Promise<string> {
|
public async patchAsync(): Promise<string> {
|
||||||
throw new Error("Not yet implemented");
|
throw new Error("Not yet implemented");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class NotebookWorkspaceResourceProviderClient implements IResourceProviderClient<NotebookWorkspace> {
|
export class NotebookWorkspaceResourceProviderClient implements IResourceProviderClient<NotebookWorkspace> {
|
||||||
public async deleteAsync(url: string, apiVersion: string): Promise<void> {
|
public async deleteAsync(): Promise<void> {
|
||||||
throw new Error("Not yet implemented");
|
throw new Error("Not yet implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
public async postAsync(url: string, body: any, apiVersion: string): Promise<NotebookWorkspace> {
|
public async postAsync(): Promise<NotebookWorkspace> {
|
||||||
throw new Error("Not yet implemented");
|
throw new Error("Not yet implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getAsync(url: string, apiVersion: string): Promise<NotebookWorkspace | NotebookWorkspace[]> {
|
public async getAsync(): Promise<NotebookWorkspace | NotebookWorkspace[]> {
|
||||||
throw new Error("Not yet implemented");
|
throw new Error("Not yet implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
public async putAsync(url: string, body: any, apiVersion: string): Promise<NotebookWorkspace> {
|
public async putAsync(): Promise<NotebookWorkspace> {
|
||||||
throw new Error("Not yet implemented");
|
throw new Error("Not yet implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
public async patchAsync(url: string, body: any, apiVersion: string): Promise<NotebookWorkspace> {
|
public async patchAsync(): Promise<NotebookWorkspace> {
|
||||||
throw new Error("Not yet implemented");
|
throw new Error("Not yet implemented");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ import { HttpHeaders, TerminalQueryParams } from "../Common/Constants";
|
|||||||
|
|
||||||
const getUrlVars = (): { [key: string]: string } => {
|
const getUrlVars = (): { [key: string]: string } => {
|
||||||
const vars: { [key: string]: string } = {};
|
const vars: { [key: string]: string } = {};
|
||||||
window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, (m, key, value): string => {
|
window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, (_m, key, value): string => {
|
||||||
vars[key] = decodeURIComponent(value);
|
vars[key] = decodeURIComponent(value);
|
||||||
return value;
|
return value;
|
||||||
});
|
});
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"strictNullChecks": true,
|
"strictNullChecks": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"noUnusedLocals": true
|
"noUnusedLocals": true,
|
||||||
|
"noUnusedParameters": true
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"./src/AuthType.ts",
|
"./src/AuthType.ts",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user