Skip to content

Commit

Permalink
Fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne committed Jul 30, 2024
1 parent a92d8a5 commit ccbecf1
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 8 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"src/**/*.d.ts"
],
"rules": {
"no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/adjacent-overload-signatures": "off"
Expand Down
2 changes: 1 addition & 1 deletion src/client/builtinRendererHooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const getPublicPath = () => {
return new URL(scriptUrl.replace(/[^/]+$/, '')).toString();
};

// eslint-disable-next-line prefer-const
// eslint-disable-next-line prefer-const, no-unused-vars, @typescript-eslint/no-unused-vars
__webpack_public_path__ = getPublicPath();

import type { OutputItem, RendererContext } from 'vscode-notebook-renderer';
Expand Down
3 changes: 2 additions & 1 deletion src/client/clipboard.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
declare const ClipboardItem: {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
prototype: any;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any, no-unused-vars
new (options: any): any;
};
declare interface ClipboardItem {
readonly types: ReadonlyArray<string>;
// eslint-disable-next-line no-unused-vars
getType(type: string): Promise<Blob>;
}

Expand Down
2 changes: 1 addition & 1 deletion src/client/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export type SaveImageAs = {
export declare const ClipboardItem: {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
prototype: any;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any, no-unused-vars
new (options: any): any;
};
export const noop = () => {
Expand Down
4 changes: 2 additions & 2 deletions src/client/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
// Licensed under the MIT License.

// This must be on top, do not change. Required by webpack.
// eslint-disable-next-line no-unused-vars
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
declare let __webpack_public_path__: string;
declare const scriptUrl: string;
const getPublicPath = () => {
return new URL(scriptUrl.replace(/[^/]+$/, '')).toString();
};

// eslint-disable-next-line prefer-const
// eslint-disable-next-line prefer-const, @typescript-eslint/no-unused-vars, no-unused-vars
__webpack_public_path__ = getPublicPath();
// This must be on top, do not change. Required by webpack.
import './index.css';
Expand Down
8 changes: 6 additions & 2 deletions src/client/transforms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ import Loadable, { LoadableComponent } from '@loadable/component';
class TransformData {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
private cachedPromise: undefined | Promise<any>;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
constructor(public mimeType: string, private importer: () => Promise<any>) {}
constructor(
// eslint-disable-next-line no-unused-vars
public mimeType: string,
// eslint-disable-next-line @typescript-eslint/no-explicit-any, no-unused-vars
private importer: () => Promise<any>
) {}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
public getComponent(): Promise<any> {
if (!this.cachedPromise) {
Expand Down
2 changes: 1 addition & 1 deletion src/client/vegaRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const getPublicPath = () => {
return new URL(scriptUrl.replace(/[^/]+$/, '')).toString();
};

// eslint-disable-next-line prefer-const
// eslint-disable-next-line prefer-const, @typescript-eslint/no-unused-vars, no-unused-vars
__webpack_public_path__ = getPublicPath();

import * as vegaEmbed from 'vega-embed';
Expand Down

0 comments on commit ccbecf1

Please sign in to comment.