Skip to content

Commit

Permalink
WIP: linting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
CMCDragonkai committed Sep 11, 2022
1 parent bf28809 commit 63fde43
Show file tree
Hide file tree
Showing 40 changed files with 763 additions and 633 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"@typescript-eslint/consistent-type-imports": ["error"],
"@typescript-eslint/consistent-type-exports": ["error"],
"no-throw-literal": "off",
"@typescript-eslint/no-throw-literal": ["error"],
"@typescript-eslint/no-throw-literal": "off",
"@typescript-eslint/no-floating-promises": ["error", {
"ignoreVoid": true,
"ignoreIIFE": true
Expand Down
162 changes: 82 additions & 80 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@
"@types/prompts": "^2.0.13",
"@types/readable-stream": "^2.3.11",
"@types/uuid": "^8.3.0",
"@typescript-eslint/eslint-plugin": "^5.23.0",
"@typescript-eslint/parser": "^5.23.0",
"@typescript-eslint/eslint-plugin": "^5.36.2",
"@typescript-eslint/parser": "^5.36.2",
"babel-jest": "^28.1.3",
"benny": "^3.7.1",
"common-tags": "^1.8.2",
Expand Down
17 changes: 10 additions & 7 deletions src/acl/ACL.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import type { DB, LevelPath } from '@matrixai/db';
import type { PermissionId, PermissionIdString, VaultActions } from './types';
import type { Ref } from '../types';
import type { DBTransaction } from '@matrixai/db';
import type { Permission } from './types';
import type { VaultAction, VaultId } from '../vaults/types';
import type { GestaltAction } from '../gestalts/types';
import type { DB, DBTransaction, LevelPath } from '@matrixai/db';
import type {
PermissionId,
PermissionIdString,
Permission,
VaultActions,
} from './types';
import type { NodeId } from '../nodes/types';
import type { GestaltAction } from '../gestalts/types';
import type { VaultAction, VaultId } from '../vaults/types';
import type { Ref } from '../types';
import Logger from '@matrixai/logger';
import { IdInternal } from '@matrixai/id';
import {
Expand Down
8 changes: 4 additions & 4 deletions src/agent/GRPCClientAgent.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import type { ClientDuplexStream } from '@grpc/grpc-js';
import type { ClientReadableStream } from '@grpc/grpc-js/build/src/call';
import type {
AsyncGeneratorReadableStreamClient,
AsyncGeneratorDuplexStreamClient,
} from '../grpc/types';
import type { NodeId } from '../nodes/types';
import type { Host, Port, ProxyConfig, TLSConfig } from '../network/types';
import type * as utilsPB from '../proto/js/polykey/v1/utils/utils_pb';
import type * as vaultsPB from '../proto/js/polykey/v1/vaults/vaults_pb';
import type * as nodesPB from '../proto/js/polykey/v1/nodes/nodes_pb';
import type * as notificationsPB from '../proto/js/polykey/v1/notifications/notifications_pb';
import type { Timer } from '../types';
import type {
AsyncGeneratorReadableStreamClient,
AsyncGeneratorDuplexStreamClient,
} from '../grpc/types';
import Logger from '@matrixai/logger';
import { CreateDestroy, ready } from '@matrixai/async-init/dist/CreateDestroy';
import * as agentErrors from './errors';
Expand Down
2 changes: 1 addition & 1 deletion src/client/GRPCClientClient.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Interceptor } from '@grpc/grpc-js';
import type { ClientReadableStream } from '@grpc/grpc-js/build/src/call';
import type { AsyncGeneratorReadableStreamClient } from '../grpc/types';
import type { Session } from '../sessions';
import type { NodeId } from '../nodes/types';
import type { Host, Port, ProxyConfig, TLSConfig } from '../network/types';
Expand All @@ -14,7 +15,6 @@ import type * as keysPB from '../proto/js/polykey/v1/keys/keys_pb';
import type * as permissionsPB from '../proto/js/polykey/v1/permissions/permissions_pb';
import type * as secretsPB from '../proto/js/polykey/v1/secrets/secrets_pb';
import type { Timer } from '../types';
import type { AsyncGeneratorReadableStreamClient } from '../grpc/types';
import { CreateDestroy, ready } from '@matrixai/async-init/dist/CreateDestroy';
import Logger from '@matrixai/logger';
import * as clientErrors from './errors';
Expand Down
2 changes: 1 addition & 1 deletion src/contexts/decorators/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as contextsUtils from '../utils';
* Context parameter decorator
* It is only allowed to be used once
*/
function context(target: Object, key: string | symbol, index: number) {
function context(target: any, key: string | symbol, index: number) {
const targetName = target['name'] ?? target.constructor.name;
const method = target[key];
if (contextsUtils.contexts.has(method)) {
Expand Down
7 changes: 2 additions & 5 deletions src/contexts/decorators/timedCancellable.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

// equivalent to timed(cancellable())
// Equivalent to timed(cancellable())
// timeout is always lazy
// it's only if you call cancel
// PLUS this only works with PromiseLike
Expand All @@ -11,8 +10,6 @@ function timedCancellable(
lazy: boolean = false,
delay: number = Infinity,
errorTimeoutConstructor: new () => Error = contextsErrors.ErrorContextsTimedTimeOut,
) {

}
) {}

export default timedCancellable;
Loading

0 comments on commit 63fde43

Please sign in to comment.