Skip to content

Commit c0381e6

Browse files
committed
Replace or remove rules following breaking changes (#3112)
This either replaces or removes inline comments disabling ESLint rules following the configuration changes in #3107 and rule changes in `@metamask/eslint-config`.
1 parent b911229 commit c0381e6

File tree

128 files changed

+63
-197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+63
-197
lines changed

packages/create-snap/src/cmds/init/initHandler.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// eslint-disable-next-line import/no-extraneous-dependencies
21
import cliPackageJson from '@metamask/create-snap/package.json';
32
import type { NpmSnapPackageJson } from '@metamask/snaps-utils';
43
import {

packages/create-snap/src/types/yargs.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Options } from 'yargs';
22

3-
// eslint-disable-next-line @typescript-eslint/ban-types
3+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
44
type OptionalArguments<Type = {}> = Type & {
55
/** Non-option arguments */
66
_?: (string | number)[];

packages/examples/packages/bip32/src/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ export const onRpcRequest: OnRpcRequestHandler = async ({ request }) => {
4646
const { message, curve, ...params } = request.params as SignMessageParams;
4747

4848
if (!message || typeof message !== 'string') {
49-
// eslint-disable-next-line @typescript-eslint/no-throw-literal
5049
throw new InvalidParamsError(`Invalid signature data: "${message}".`);
5150
}
5251

@@ -74,7 +73,6 @@ export const onRpcRequest: OnRpcRequestHandler = async ({ request }) => {
7473
});
7574

7675
if (!approved) {
77-
// eslint-disable-next-line @typescript-eslint/no-throw-literal
7876
throw new UserRejectedRequestError();
7977
}
8078

@@ -100,7 +98,6 @@ export const onRpcRequest: OnRpcRequestHandler = async ({ request }) => {
10098
}
10199

102100
default:
103-
// eslint-disable-next-line @typescript-eslint/no-throw-literal
104101
throw new MethodNotFoundError({ method: request.method });
105102
}
106103
};

packages/examples/packages/bip44/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ export const onRpcRequest: OnRpcRequestHandler = async ({ request }) => {
5959
});
6060

6161
if (!approved) {
62-
// eslint-disable-next-line @typescript-eslint/no-throw-literal
6362
throw new UserRejectedRequestError();
6463
}
6564

@@ -68,7 +67,6 @@ export const onRpcRequest: OnRpcRequestHandler = async ({ request }) => {
6867
}
6968

7069
default:
71-
// eslint-disable-next-line @typescript-eslint/no-throw-literal
7270
throw new MethodNotFoundError({ method: request.method });
7371
}
7472
};

packages/examples/packages/browserify-plugin/scripts/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ async function main() {
3131

3232
// For this example we use Babel to transpile the TypeScript code to
3333
// JavaScript.
34-
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
34+
// eslint-disable-next-line @typescript-eslint/no-require-imports, n/global-require
3535
bundler.transform(require('babelify'), {
3636
...babelConfig,
3737
extensions: ['.js', '.ts'],

packages/examples/packages/browserify-plugin/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export const onRpcRequest: OnRpcRequestHandler = async ({ request }) => {
2323
return 'Hello from Browserify!';
2424

2525
default: {
26-
// eslint-disable-next-line @typescript-eslint/no-throw-literal
2726
throw new MethodNotFoundError({ method: request.method });
2827
}
2928
}

packages/examples/packages/browserify/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export const onRpcRequest: OnRpcRequestHandler = async ({ request }) => {
2525
return 'Hello from the MetaMask Snaps CLI using Browserify!';
2626

2727
default: {
28-
// eslint-disable-next-line @typescript-eslint/no-throw-literal
2928
throw new MethodNotFoundError({ method: request.method });
3029
}
3130
}

packages/examples/packages/client-status/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export const onRpcRequest: OnRpcRequestHandler = async ({ request }) => {
2323
}
2424

2525
default:
26-
// eslint-disable-next-line @typescript-eslint/no-throw-literal
2726
throw new MethodNotFoundError({ method: request.method });
2827
}
2928
};

packages/examples/packages/cronjobs/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ export const onCronjob: OnCronjobHandler = async ({ request }) => {
5050
},
5151
});
5252
default:
53-
// eslint-disable-next-line @typescript-eslint/no-throw-literal
5453
throw new MethodNotFoundError({ method: request.method });
5554
}
5655
};
@@ -105,7 +104,6 @@ export const onRpcRequest: OnRpcRequestHandler = async ({ request }) => {
105104
method: 'snap_getBackgroundEvents',
106105
});
107106
default:
108-
// eslint-disable-next-line @typescript-eslint/no-throw-literal
109107
throw new MethodNotFoundError({ method: request.method });
110108
}
111109
};

packages/examples/packages/dialogs/src/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ export const onRpcRequest: OnRpcRequestHandler = async ({ request }) => {
9191
});
9292

9393
default:
94-
// eslint-disable-next-line @typescript-eslint/no-throw-literal
9594
throw new MethodNotFoundError({ method: request.method });
9695
}
9796
};

0 commit comments

Comments
 (0)