chore(twenty-server): remove eslint warn + add maxWarning 0 (#10103)

This commit is contained in:
Antoine Moreaux
2025-02-11 10:38:43 +01:00
committed by GitHub
parent 59af303b4c
commit de91a5e39e
17 changed files with 57 additions and 34 deletions

View File

@ -2,6 +2,8 @@
import { Injectable } from '@nestjs/common';
import { Module } from '@nestjs/core/injector/module';
import { isDefined } from 'twenty-shared';
import { WorkspaceQueryHookInstance } from 'src/engine/api/graphql/workspace-query-runner/workspace-query-hook/interfaces/workspace-query-hook.interface';
import { WorkspaceResolverBuilderMethodNames } from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
@ -48,9 +50,13 @@ export class WorkspaceQueryHookStorage {
throw new Error(`Can't split workspace query hook key: ${key}`);
}
// Retrive wildcard pre-hook instances
if (this.preHookInstances.has(`*.${methodName}`)) {
wildcardInstances = this.preHookInstances.get(`*.${methodName}`)!;
// Retrieve wildcard pre-hook instances
const wildcardPrehooksInstance = this.preHookInstances.get(
`*.${methodName}`,
);
if (isDefined(wildcardPrehooksInstance)) {
wildcardInstances = wildcardPrehooksInstance;
}
return [...wildcardInstances, ...(this.preHookInstances.get(key) ?? [])];
@ -80,9 +86,13 @@ export class WorkspaceQueryHookStorage {
throw new Error(`Can't split workspace query hook key: ${key}`);
}
// Retrive wildcard post-hook instances
if (this.postHookInstances.has(`*.${methodName}`)) {
wildcardInstances = this.postHookInstances.get(`*.${methodName}`)!;
// Retrieve wildcard post-hook instances
const wildcardPosthooksInstance = this.postHookInstances.get(
`*.${methodName}`,
);
if (isDefined(wildcardPosthooksInstance)) {
wildcardInstances = wildcardPosthooksInstance;
}
return [...wildcardInstances, ...(this.postHookInstances.get(key) ?? [])];

View File

@ -48,6 +48,7 @@ export class WorkspaceSchemaFactory {
);
if (isNewRelationEnabled) {
// eslint-disable-next-line no-console
console.log(
chalk.yellow('🚧 New relation schema generation is enabled 🚧'),
);
@ -84,6 +85,7 @@ export class WorkspaceSchemaFactory {
(isNewRelationEnabled !== cachedIsNewRelationEnabled &&
cachedIsNewRelationEnabled !== undefined)
) {
// eslint-disable-next-line no-console
console.log(
chalk.yellow('Recomputing due to new relation feature flag'),
{