Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieMagee committed Jun 4, 2021
1 parent 4a81888 commit 56d6f7c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ module.exports = {
'@typescript-eslint/unbound-method': 0,

'jest/valid-title': [0, { ignoreTypeOfDescribeName: true }],
'max-classes-per-file': 0,
'class-methods-use-this': 0,
},
},
{
Expand Down
4 changes: 1 addition & 3 deletions lib/util/cache/package/decorator.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable max-classes-per-file */
/* eslint-disable class-methods-use-this */
import os from 'os';
import { mock } from 'jest-mock-extended';
import { getName } from '../../../../test/util';
Expand Down Expand Up @@ -40,7 +38,7 @@ describe(getName(), () => {
class MyClass {
@cache({
namespace: (arg: GetReleasesConfig) => arg.registryUrl,
key: 'key',
key: () => 'key',
})
public async getNumber(_: GetReleasesConfig): Promise<number> {
await spy();
Expand Down
4 changes: 2 additions & 2 deletions lib/util/cache/package/decorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { logger } from '../../../logger';
import * as packageCache from '.';

type Handler<T> = (parameters: DecoratorParameters<T>) => Promise<unknown>;
type Method<T> = (this: T, ...args: any[]) => any;
type Method<T> = (this: T, ...args: any[]) => Promise<any>;
type Decorator<T> = <U extends T>(
target: U,
key: keyof any,
key: keyof U,
descriptor: TypedPropertyDescriptor<Method<T>>
) => TypedPropertyDescriptor<Method<T>>;

Expand Down

0 comments on commit 56d6f7c

Please sign in to comment.