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 {
|
||||
public static register(): void {
|
||||
ko.bindingHandlers.react = {
|
||||
init: (
|
||||
element: any,
|
||||
wrappedValueAccessor: () => any,
|
||||
allBindings?: ko.AllBindings,
|
||||
viewModel?: any,
|
||||
bindingContext?: ko.BindingContext
|
||||
) => {
|
||||
init: (element: any, wrappedValueAccessor: () => any) => {
|
||||
const adapter: ReactAdapter = wrappedValueAccessor();
|
||||
|
||||
if (adapter.setElement) {
|
||||
|
|
|
@ -73,7 +73,7 @@ export class Splitter {
|
|||
$(this.leftSide).resizable(splitterOptions);
|
||||
}
|
||||
|
||||
private onResizeStart: JQueryUI.ResizableEvent = (e: Event, ui: JQueryUI.ResizableUIParams) => {
|
||||
private onResizeStart: JQueryUI.ResizableEvent = () => {
|
||||
if (this.direction === SplitterDirection.Vertical) {
|
||||
$(".ui-resizable-helper").height("100%");
|
||||
} else {
|
||||
|
@ -82,9 +82,7 @@ export class Splitter {
|
|||
$("iframe").css("pointer-events", "none");
|
||||
};
|
||||
|
||||
private onResizeStop: JQueryUI.ResizableEvent = (e: Event, ui: JQueryUI.ResizableUIParams) => {
|
||||
$("iframe").css("pointer-events", "auto");
|
||||
};
|
||||
private onResizeStop: JQueryUI.ResizableEvent = () => $("iframe").css("pointer-events", "auto");
|
||||
|
||||
public collapseLeft() {
|
||||
this.lastX = $(this.splitter).position().left;
|
||||
|
|
|
@ -128,21 +128,21 @@ class InputTypeaheadViewModel {
|
|||
},
|
||||
},
|
||||
callback: {
|
||||
onClick: (node: any, a: any, item: OnClickItem, event: any) => {
|
||||
onClick: (_node: unknown, _a: unknown, item: OnClickItem) => {
|
||||
cache.selection = item;
|
||||
|
||||
if (params.selection) {
|
||||
params.selection(item);
|
||||
}
|
||||
},
|
||||
onResult(node: any, query: any, result: any, resultCount: any, resultCountPerGroup: any) {
|
||||
onResult(_node: unknown, query: any) {
|
||||
cache.inputValue = query;
|
||||
if (params.inputValue) {
|
||||
params.inputValue(query);
|
||||
}
|
||||
},
|
||||
},
|
||||
template: (query: string, item: any) => {
|
||||
template: (_query: string, item: any) => {
|
||||
// Don't display id if caption *IS* the id
|
||||
return item.caption === item.value
|
||||
? "<span>{{caption}}</span>"
|
||||
|
|
|
@ -11,7 +11,7 @@ let fakeAjaxResponse: AjaxResponse = {
|
|||
responseType: "json",
|
||||
};
|
||||
export const sessions = {
|
||||
create: (serverConfig: unknown, body: object): Observable<AjaxResponse> => of(fakeAjaxResponse),
|
||||
create: (): Observable<AjaxResponse> => of(fakeAjaxResponse),
|
||||
__setResponse: (response: AjaxResponse) => {
|
||||
fakeAjaxResponse = response;
|
||||
},
|
||||
|
|
|
@ -220,7 +220,7 @@ export class NotebookContentClient {
|
|||
return this.contentProvider
|
||||
.remove(this.getServerConfig(), path)
|
||||
.toPromise()
|
||||
.then((xhr: AjaxResponse) => path);
|
||||
.then(() => path);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -23,7 +23,7 @@ export class AccessibleVerticalList {
|
|||
this.onSelect = onSelect;
|
||||
}
|
||||
|
||||
public onKeyDown = (source: any, event: KeyboardEvent): boolean => {
|
||||
public onKeyDown = (_src: unknown, event: KeyboardEvent): boolean => {
|
||||
const targetContainer: Element = <Element>event.target;
|
||||
if (this.items == null || this.items.length === 0) {
|
||||
// no items so this should be a noop
|
||||
|
|
|
@ -2,11 +2,11 @@ import { IResourceProviderClient } from "../ResourceProvider/IResourceProviderCl
|
|||
import { NotebookWorkspace } from "../Contracts/DataModels";
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
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({
|
||||
notebookServerEndpoint: "http://localhost:8888",
|
||||
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");
|
||||
}
|
||||
|
||||
public async putAsync(url: string, body: any, apiVersion: string): Promise<string> {
|
||||
public async putAsync(): Promise<string> {
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
public async postAsync(url: string, body: any, apiVersion: string): Promise<NotebookWorkspace> {
|
||||
public async postAsync(): Promise<NotebookWorkspace> {
|
||||
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");
|
||||
}
|
||||
|
||||
public async putAsync(url: string, body: any, apiVersion: string): Promise<NotebookWorkspace> {
|
||||
public async putAsync(): Promise<NotebookWorkspace> {
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import { HttpHeaders, TerminalQueryParams } from "../Common/Constants";
|
|||
|
||||
const getUrlVars = (): { [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);
|
||||
return value;
|
||||
});
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
"noEmit": true,
|
||||
"strictNullChecks": true,
|
||||
"strict": true,
|
||||
"noUnusedLocals": true
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true
|
||||
},
|
||||
"files": [
|
||||
"./src/AuthType.ts",
|
||||
|
|
Loading…
Reference in New Issue