fix: guard global.metrics in singleFlightMiddleware - #670
Quality Gate failed
Annotations
Check notice on line 6 in src/service/worker/runtime/graphql/middlewares/updateSchema.ts
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/middlewares/updateSchema.ts#L6
'../typings' imported multiple times.
Check notice on line 7 in src/service/worker/runtime/graphql/middlewares/updateSchema.ts
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/middlewares/updateSchema.ts#L7
'../typings' imported multiple times.
Check notice on line 5 in src/service/worker/runtime/graphql/middlewares/response.ts
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/middlewares/response.ts#L5
Remove this unused import of 'Recorder'.
Check notice on line 4 in src/service/worker/runtime/graphql/middlewares/response.ts
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/middlewares/response.ts#L4
Remove this unused import of 'Maybe'.
Check warning on line 18 in src/service/worker/runtime/graphql/middlewares/error.ts
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/middlewares/error.ts#L18
Prefer using an optional chain expression instead, as it's more concise and easier to read.
Check warning on line 19 in src/service/worker/runtime/graphql/middlewares/query.ts
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/middlewares/query.ts#L19
Prefer using an optional chain expression instead, as it's more concise and easier to read.
Check warning on line 3 in src/service/worker/runtime/graphql/middlewares/query.ts
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/middlewares/query.ts#L3
Prefer `node:url` over `url`.
Check warning on line 40 in src/service/worker/runtime/graphql/schema/schemaDirectives/Deprecated.ts
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/schema/schemaDirectives/Deprecated.ts#L40
Remove this useless assignment to variable "type".
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/schema/schemaDirectives/TranslatableV2.ts#L23
Unnecessary escape character: \`.
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/schema/schemaDirectives/TranslatableV2.ts#L23
Unnecessary escape character: \`.
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/schema/schemaDirectives/TranslatableV2.ts#L23
Unnecessary escape character: \`.
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/schema/schemaDirectives/TranslatableV2.ts#L23
Unnecessary escape character: \`.
Check notice on line 35 in src/service/worker/runtime/graphql/schema/schemaDirectives/Sanitize.ts
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/schema/schemaDirectives/Sanitize.ts#L35
`new Error()` is too unspecific for a type check. Use `new TypeError()` instead.
Check notice on line 13 in src/service/worker/runtime/graphql/schema/typeDefs/index.ts
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/schema/typeDefs/index.ts#L13
This assertion is unnecessary since it does not change the type of the expression.
Check notice on line 17 in src/service/worker/runtime/graphql/schema/typeDefs/index.ts
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/schema/typeDefs/index.ts#L17
Unexpected negated condition.
Check warning on line 25 in src/service/worker/runtime/graphql/schema/typeDefs/sanitizedString.ts
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/schema/typeDefs/sanitizedString.ts#L25
Prefer using an optional chain expression instead, as it's more concise and easier to read.
Check warning on line 26 in src/service/worker/runtime/graphql/schema/typeDefs/sanitizedString.ts
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/schema/typeDefs/sanitizedString.ts#L26
Prefer using an optional chain expression instead, as it's more concise and easier to read.
Check notice on line 36 in src/service/worker/runtime/graphql/schema/typeDefs/sanitizedString.ts
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/schema/typeDefs/sanitizedString.ts#L36
Replace this "switch" statement by "if" statements to increase readability.
Check notice on line 15 in src/service/worker/runtime/graphql/schema/index.ts
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/schema/index.ts#L15
`String.raw` should be used to avoid escaping `\`.
Check notice on line 33 in src/service/worker/runtime/graphql/schema/index.ts
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/schema/index.ts#L33
This assertion is unnecessary since it does not change the type of the expression.
Check notice on line 47 in src/service/worker/runtime/graphql/schema/index.ts
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/schema/index.ts#L47
Unnecessary use of boolean literals in conditional expression.
Check notice on line 10 in src/service/worker/runtime/graphql/utils/cacheControl.ts
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/utils/cacheControl.ts#L10
`String.raw` should be used to avoid escaping `\`.
Check notice on line 53 in src/service/worker/runtime/graphql/utils/cacheControl.ts
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/utils/cacheControl.ts#L53
Do not call `Array#push()` multiple times.
Check notice on line 66 in src/service/worker/runtime/graphql/utils/error.ts
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/utils/error.ts#L66
Unexpected negated condition.
Check notice on line 20 in src/service/worker/runtime/graphql/utils/translations.ts
sonar-workflows / SonarQube Code Analysis
src/service/worker/runtime/graphql/utils/translations.ts#L20
Use the "RegExp.exec()" method instead.
