Errors 250, Warnings 1
Found 250 errors and 1 warnings
Annotations
Check failure on line 29 in packages/nestjs-grpc-identity/integration/grpc-identity.test.ts
github-actions / Lint
(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.
Unexpected any. Specify a different type.
Raw output
26 | describe('grpc identity', () => {
27 | let service: INestMicroservice
> 28 | let client: any
| ^
29 |
30 | beforeAll(async () => {
31 | const servicePort = await getPort()
Check failure on line 78 in packages/nestjs-grpc-identity/integration/grpc-identity.test.ts
github-actions / Lint
(n/no-sync): Unexpected sync method: 'readFileSync'.
Unexpected sync method: 'readFileSync'.
Raw output
75 |
76 | it(`check success`, async () => {
> 77 | const privateKey = readFileSync(join(__dirname, 'src/.jwks.pem'), 'utf-8')
| ^
78 |
79 | const token = sign({ sub: 'test' }, privateKey, { algorithm: 'RS256' })
80 |
Check failure on line 103 in packages/nestjs-grpc-identity/integration/grpc-identity.test.ts
github-actions / Lint
(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.
Unexpected any. Specify a different type.
Raw output
100 | await client.test({ id: 'test' }, metadata).toPromise()
101 | } catch (error) {
> 102 | expect((error as any).code).toBe(status.UNAUTHENTICATED)
| ^
103 | }
104 | })
105 | })
Check failure on line 2 in packages/nestjs-grpc-reflection/proto/index.d.ts
github-actions / Lint
(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.
Unexpected any. Specify a different type.
Raw output
> 1 | export declare const serverReflectionPath: any
| ^
2 |
Check warning on line 14 in packages/nestjs-proto-types/src/index.ts
github-actions / Lint
(unknown): Unused eslint-disable directive (no problems were reported from '@typescript-eslint/prefer-ts-expect-error').
Unused eslint-disable directive (no problems were reported from '@typescript-eslint/prefer-ts-expect-error').
Raw output
11 | * @typedef {string} ProtoFile - Represents the imported `.proto` file as a string
12 | */
> 13 | // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error
| ^
14 | declare module '*.proto'
15 |
Check failure on line 79 in packages/nestjs-batch-queue/integration/test/batch-queue.test.ts
github-actions / Lint
(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.
Unexpected any. Specify a different type.
Raw output
76 | channelWrapper.consume('test-queue', (msg) => {
77 | ;(async (): Promise<void> => {
> 78 | const producer: Producer<any> = app.get(BATCH_QUEUE_PRODUCER)
| ^
79 | const parsed: { queueName: string; value: any } = JSON.parse(msg.content.toString())
80 | try {
81 | await producer.produce(parsed.queueName, parsed.value)
Check failure on line 80 in packages/nestjs-batch-queue/integration/test/batch-queue.test.ts
github-actions / Lint
(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.
Unexpected any. Specify a different type.
Raw output
77 | ;(async (): Promise<void> => {
78 | const producer: Producer<any> = app.get(BATCH_QUEUE_PRODUCER)
> 79 | const parsed: { queueName: string; value: any } = JSON.parse(msg.content.toString())
| ^
80 | try {
81 | await producer.produce(parsed.queueName, parsed.value)
82 | succesProduceCount += 1
Check failure on line 123 in packages/nestjs-batch-queue/integration/test/batch-queue.test.ts
github-actions / Lint
(@typescript-eslint/no-non-null-assertion): Forbidden non-null assertion.
Forbidden non-null assertion.
Raw output
120 | await waitForConsumeCount(1, consumeBatchs)
121 | expect(consumeBatchs.length).toBe(1)
> 122 | const result = consumeBatchs.pop()!
| ^
123 | expect(result[0]).toBe('batch-queue')
124 | expect(result[1]).toEqual(['test-0-0'])
125 | })
Check failure on line 141 in packages/nestjs-batch-queue/integration/test/batch-queue.test.ts
github-actions / Lint
(@typescript-eslint/no-non-null-assertion): Forbidden non-null assertion.
Forbidden non-null assertion.
Raw output
138 | await waitForConsumeCount(1, consumeBatchs)
139 | expect(consumeBatchs.length).toBe(1)
> 140 | const result = consumeBatchs.pop()!
| ^
141 | expect(result[0]).toBe('batch-queue')
142 | const expectMessages = []
143 | for (let i = 0; i < 9_000; i += 1) {
Check failure on line 163 in packages/nestjs-batch-queue/integration/test/batch-queue.test.ts
github-actions / Lint
(@typescript-eslint/no-non-null-assertion): Forbidden non-null assertion.
Forbidden non-null assertion.
Raw output
160 | await waitForConsumeCount(1, consumeBatchs)
161 | expect(consumeBatchs.length).toBe(1)
> 162 | const result = consumeBatchs.pop()!
| ^
163 | expect(result[0]).toBe('batch-queue')
164 | const expectMessages = []
165 | for (let i = 0; i < 10_000; i += 1) {
Check failure on line 173 in packages/nestjs-batch-queue/integration/test/batch-queue.test.ts
github-actions / Lint
(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.
Unexpected any. Specify a different type.
Raw output
170 |
171 | it('handle multiple queues', async () => {
> 172 | const messages: Array<Promise<any>> = []
| ^
173 | const queues: Array<string> = ['queue-one', 'queue-two', 'queue-three']
174 | const expectedResults: Record<string, Array<string>> = {
175 | 'queue-one': [],
Check failure on line 117 in packages/nestjs-connectrpc/src/utils/async.utils.ts
github-actions / Lint
(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.
Unexpected any. Specify a different type.
Raw output
114 | // @ts-expect-error undefined method
115 | resultOrDeferred.subscribe({
> 116 | next: (value: any) => {
| ^
117 | subscriber.next(value as T)
118 | },
119 | error: (error: any) => {
Check failure on line 120 in packages/nestjs-connectrpc/src/utils/async.utils.ts
github-actions / Lint
(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.
Unexpected any. Specify a different type.
Raw output
117 | subscriber.next(value as T)
118 | },
> 119 | error: (error: any) => {
| ^
120 | subscriber.error(error)
121 | },
122 | complete: () => {
github-actions / Lint
(@typescript-eslint/no-deprecated): `PromiseClient` is deprecated. use Client
`PromiseClient` is deprecated. use Client
Raw output
22 | describe('grpc error', () => {
23 | let service: INestMicroservice
> 24 | let client: PromiseClient<typeof TestService>
| ^
25 |
26 | beforeAll(async () => {
27 | const port = await getPort()
github-actions / Lint
(@typescript-eslint/no-deprecated): `createPromiseClient` is deprecated. use createClient.
`createPromiseClient` is deprecated. use createClient.
Raw output
41 | await service.listen()
42 |
> 43 | client = createPromiseClient(
| ^
44 | TestService,
45 | createGrpcTransport({
46 | baseUrl: `http://localhost:${port}`,
github-actions / Lint
(@typescript-eslint/ban-ts-comment): Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 10 characters or longer.
Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 10 characters or longer.
Raw output
63 | if (error instanceof ConnectError) {
64 | expect(
> 65 | // @ts-expect-error
| ^
66 | error.details.map((detail: { value: Uint8Array }) =>
67 | // @ts-expect-error
68 | ValidationError.fromBinary(detail.value))
github-actions / Lint
(@typescript-eslint/ban-ts-comment): Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 10 characters or longer.
Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 10 characters or longer.
Raw output
65 | // @ts-expect-error
66 | error.details.map((detail: { value: Uint8Array }) =>
> 67 | // @ts-expect-error
| ^
68 | ValidationError.fromBinary(detail.value))
69 | ).toEqual(
70 | expect.arrayContaining([
github-actions / Lint
(@typescript-eslint/no-unsafe-return): Unsafe return of a value of type error.
Unsafe return of a value of type error.
Raw output
66 | error.details.map((detail: { value: Uint8Array }) =>
67 | // @ts-expect-error
> 68 | ValidationError.fromBinary(detail.value))
| ^
69 | ).toEqual(
70 | expect.arrayContaining([
71 | expect.objectContaining({
github-actions / Lint
(@typescript-eslint/no-unsafe-call): Unsafe call of a(n) `error` type typed value.
Unsafe call of a(n) `error` type typed value.
Raw output
66 | error.details.map((detail: { value: Uint8Array }) =>
67 | // @ts-expect-error
> 68 | ValidationError.fromBinary(detail.value))
| ^
69 | ).toEqual(
70 | expect.arrayContaining([
71 | expect.objectContaining({
Check failure on line 36 in packages/nestjs-batch-queue/src/batch-queue/batch-queue.test.ts
github-actions / Lint
(@typescript-eslint/ban-ts-comment): Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 10 characters or longer.
Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 10 characters or longer.
Raw output
33 |
34 | beforeEach(() => {
> 35 | // @ts-expect-error
| ^
36 | processorFnMock = jest.fn()
37 | })
38 |
Check failure on line 41 in packages/nestjs-batch-queue/src/batch-queue/batch-queue.test.ts
github-actions / Lint
(@typescript-eslint/ban-ts-comment): Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 10 characters or longer.
Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 10 characters or longer.
Raw output
38 |
39 | beforeEach(() => {
> 40 | // @ts-expect-error
| ^
41 | checkManager = {
42 | getState: jest.fn().mockReturnValue(true) as CheckManager['getState'],
43 | }
Check failure on line 136 in packages/nestjs-batch-queue/src/batch-queue/batch-queue.ts
github-actions / Lint
(@typescript-eslint/no-non-null-assertion): Forbidden non-null assertion.
Forbidden non-null assertion.
Raw output
133 | this.mutexes.set(queueName, new Mutex())
134 | }
> 135 | return this.mutexes.get(queueName)!
| ^
136 | }
137 | }
138 |
github-actions / Lint
(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.
Unexpected any. Specify a different type.
Raw output
21 | useClass?: Type<BatchQueueOptionsFactory>
22 | useFactory?: (...args: Array<any>) => BatchQueueModuleOptions | Promise<BatchQueueModuleOptions>
> 23 | inject?: Array<any>
| ^
24 | }
25 |
Check failure on line 57 in packages/nestjs-batch-queue/src/module/batch-queue.module.ts
github-actions / Lint
(@typescript-eslint/no-non-null-assertion): Forbidden non-null assertion.
Forbidden non-null assertion.
Raw output
54 | if (!(options.useExisting || options.useFactory)) {
55 | providers.push({
> 56 | provide: options.useClass!,
| ^
57 | useClass: options.useClass!,
58 | })
59 | }
Check failure on line 58 in packages/nestjs-batch-queue/src/module/batch-queue.module.ts
github-actions / Lint
(@typescript-eslint/no-non-null-assertion): Forbidden non-null assertion.
Forbidden non-null assertion.
Raw output
55 | providers.push({
56 | provide: options.useClass!,
> 57 | useClass: options.useClass!,
| ^
58 | })
59 | }
60 | return providers