feat(common): bump yarn #4
Errors 34, Warnings 0
Found 34 errors and 0 warnings
Annotations
Check failure on line 3 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/consistent-type-imports): All imports in the declaration are only used as types. Use `import type`.
All imports in the declaration are only used as types. Use `import type`.
Raw output
1 | import { Any } from 'google-protobuf/google/protobuf/any_pb'
> 2 | import { Message } from 'google-protobuf'
| ^
3 | import { Metadata } from '@grpc/grpc-js'
4 | import { ServiceError } from '@grpc/grpc-js'
5 |
Check failure on line 5 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/consistent-type-imports): All imports in the declaration are only used as types. Use `import type`.
All imports in the declaration are only used as types. Use `import type`.
Raw output
2 | import { Message } from 'google-protobuf'
3 | import { Metadata } from '@grpc/grpc-js'
> 4 | import { ServiceError } from '@grpc/grpc-js'
| ^
5 |
6 | import { Status } from '../proto/google/rpc/status_pb'
7 | import { Code } from '../proto/google/rpc/code_pb'
Check failure on line 43 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/member-ordering): Member fromServiceError should be declared before all public instance method definitions.
Member fromServiceError should be declared before all public instance method definitions.
Raw output
40 | }
41 |
> 42 | static fromServiceError<TMap extends Record<string, (bytes: Uint8Array) => any>>(
| ^
43 | error: ServiceError,
44 | deserializeMap: TMap = {} as TMap
45 | ): ErrorStatus<ReturnType<TMap[keyof TMap]>> {
Check failure on line 58 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/no-unsafe-call): Unsafe call of an `any` typed value.
Unsafe call of an `any` typed value.
Raw output
55 | .getDetailsList()
56 | .reduce((result, detail) => {
> 57 | const typeName = detail.getTypeName()
| ^
58 | const deserialize = getGoogleDeserializeBinary(typeName) || deserializeMap[typeName]
59 |
60 | if (deserialize) {
Check failure on line 59 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/no-unsafe-argument): Unsafe argument of type `any` assigned to a parameter of type `string`.
Unsafe argument of type `any` assigned to a parameter of type `string`.
Raw output
56 | .reduce((result, detail) => {
57 | const typeName = detail.getTypeName()
> 58 | const deserialize = getGoogleDeserializeBinary(typeName) || deserializeMap[typeName]
| ^
59 |
60 | if (deserialize) {
61 | const message = detail.unpack(deserialize, typeName)
Check failure on line 62 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/no-unsafe-call): Unsafe call of an `any` typed value.
Unsafe call of an `any` typed value.
Raw output
59 |
60 | if (deserialize) {
> 61 | const message = detail.unpack(deserialize, typeName)
| ^
62 |
63 | if (message) {
64 | result.push({
Check failure on line 65 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/no-unsafe-call): Unsafe call of an `any` typed value.
Unsafe call of an `any` typed value.
Raw output
62 |
63 | if (message) {
> 64 | result.push({
| ^
65 | '@type': detail.getTypeUrl(),
66 | detail: message,
67 | })
Check failure on line 66 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/no-unsafe-call): Unsafe call of an `any` typed value.
Unsafe call of an `any` typed value.
Raw output
63 | if (message) {
64 | result.push({
> 65 | '@type': detail.getTypeUrl(),
| ^
66 | detail: message,
67 | })
68 | }
Check failure on line 72 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/no-unsafe-return): Unsafe return of an `any` typed value.
Unsafe return of an `any` typed value.
Raw output
69 | }
70 |
> 71 | return result
| ^
72 | }, [])
73 |
74 | errorStatus.addUnpackedDetails(details)
Check failure on line 75 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/no-unsafe-argument): Unsafe argument of type `google_protobuf_any_pb.Any` assigned to a parameter of type `{ '@type': string; detail: ReturnType<TMap[keyof TMap]>; }[]`.
Unsafe argument of type `google_protobuf_any_pb.Any` assigned to a parameter of type `{ '@type': string; detail: ReturnType<TMap[keyof TMap]>; }[]`.
Raw output
72 | }, [])
73 |
> 74 | errorStatus.addUnpackedDetails(details)
| ^
75 | }
76 |
77 | return errorStatus
Check failure on line 81 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/explicit-function-return-type): Missing return type on function.
Missing return type on function.
Raw output
78 | }
79 |
> 80 | private addUnpackedDetails(details: Array<{ '@type': string; detail: T }>) {
| ^
81 | this.details.push(...details)
82 |
83 | return this
Check failure on line 87 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/explicit-module-boundary-types): Missing return type on function.
Missing return type on function.
Raw output
84 | }
85 |
> 86 | addDetail(detail: T, typeName?: string, typeNamePrefix?: string) {
| ^
87 | const anyPb = new Any()
88 |
89 | anyPb.pack(
Check failure on line 87 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/member-ordering): Member addDetail should be declared before all private instance method definitions.
Member addDetail should be declared before all private instance method definitions.
Raw output
84 | }
85 |
> 86 | addDetail(detail: T, typeName?: string, typeNamePrefix?: string) {
| ^
87 | const anyPb = new Any()
88 |
89 | anyPb.pack(
Check failure on line 87 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/explicit-function-return-type): Missing return type on function.
Missing return type on function.
Raw output
84 | }
85 |
> 86 | addDetail(detail: T, typeName?: string, typeNamePrefix?: string) {
| ^
87 | const anyPb = new Any()
88 |
89 | anyPb.pack(
Check failure on line 88 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/no-unsafe-call): Unsafe construction of an any type value.
Unsafe construction of an any type value.
Raw output
85 |
86 | addDetail(detail: T, typeName?: string, typeNamePrefix?: string) {
> 87 | const anyPb = new Any()
| ^
88 |
89 | anyPb.pack(
90 | detail.serializeBinary(),
Check failure on line 90 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/no-unsafe-call): Unsafe call of an `any` typed value.
Unsafe call of an `any` typed value.
Raw output
87 | const anyPb = new Any()
88 |
> 89 | anyPb.pack(
| ^
90 | detail.serializeBinary(),
91 | typeName || getGoogleErrorDetailsTypeName(detail),
92 | typeNamePrefix
Check failure on line 91 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/no-unsafe-call): Unsafe call of an `any` typed value.
Unsafe call of an `any` typed value.
Raw output
88 |
89 | anyPb.pack(
> 90 | detail.serializeBinary(),
| ^
91 | typeName || getGoogleErrorDetailsTypeName(detail),
92 | typeNamePrefix
93 | )
Check failure on line 99 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/no-unsafe-call): Unsafe call of an `any` typed value.
Unsafe call of an `any` typed value.
Raw output
96 |
97 | this.details.push({
> 98 | '@type': anyPb.getTypeUrl(),
| ^
99 | detail,
100 | })
101 |
Check failure on line 106 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/explicit-module-boundary-types): Missing return type on function.
Missing return type on function.
Raw output
103 | }
104 |
> 105 | toObject() {
| ^
106 | const [status] = Object.entries(Code).find((entry) => entry[1] === this.code) || ['UNKNOWN']
107 |
108 | return {
Check failure on line 106 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/member-ordering): Member toObject should be declared before all private instance method definitions.
Member toObject should be declared before all private instance method definitions.
Raw output
103 | }
104 |
> 105 | toObject() {
| ^
106 | const [status] = Object.entries(Code).find((entry) => entry[1] === this.code) || ['UNKNOWN']
107 |
108 | return {
Check failure on line 106 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/explicit-function-return-type): Missing return type on function.
Missing return type on function.
Raw output
103 | }
104 |
> 105 | toObject() {
| ^
106 | const [status] = Object.entries(Code).find((entry) => entry[1] === this.code) || ['UNKNOWN']
107 |
108 | return {
Check failure on line 107 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/no-unsafe-enum-comparison): The two values in this comparison do not have a shared enum type.
The two values in this comparison do not have a shared enum type.
Raw output
104 |
105 | toObject() {
> 106 | const [status] = Object.entries(Code).find((entry) => entry[1] === this.code) || ['UNKNOWN']
| ^
107 |
108 | return {
109 | status,
Check failure on line 114 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/no-unsafe-call): Unsafe call of an `any` typed value.
Unsafe call of an `any` typed value.
Raw output
111 | message: this.message,
112 | details: this.details.map((d) => {
> 113 | const data = d.detail.toObject()
| ^
114 |
115 | if (isObject(data)) {
116 | return {
Check failure on line 117 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/no-unsafe-return): Unsafe return of an `any` typed value.
Unsafe return of an `any` typed value.
Raw output
114 |
115 | if (isObject(data)) {
> 116 | return {
| ^
117 | '@type': d['@type'],
118 | ...data,
119 | }
Check failure on line 123 in packages/grpc-error-status/src/error-status.ts
github-actions / Lint
(@typescript-eslint/no-unsafe-return): Unsafe return of an `any` typed value.
Unsafe return of an `any` typed value.
Raw output
120 | }
121 |
> 122 | return data
| ^
123 | }),
124 | }
125 | }