Add no-console eslint rule (#1890)

* Add no-console eslint rule

* Remove unused test
This commit is contained in:
Charles Bochet
2023-10-05 21:16:02 +02:00
committed by GitHub
parent 922f8eca0e
commit 07450df1a1
24 changed files with 69 additions and 212 deletions
@@ -3,6 +3,7 @@ import { PersonChip } from '@/people/components/PersonChip';
import { Entity } from '@/ui/input/relation-picker/types/EntityTypeForSelect';
import { UserChip } from '@/users/components/UserChip';
import { getLogoUrlFromDomainName } from '~/utils';
import { logError } from '~/utils/logError';
import { useRelationField } from '../../hooks/useRelationField';
@@ -42,7 +43,7 @@ export const RelationFieldDisplay = () => {
);
}
default:
console.warn(
logError(
`Unknown relation type: "${fieldDefinition.metadata.relationType}"
in RelationFieldDisplay`,
);
@@ -2,6 +2,7 @@ import { CompanyChip } from '@/companies/components/CompanyChip';
import { PersonChip } from '@/people/components/PersonChip';
import { Entity } from '@/ui/input/relation-picker/types/EntityTypeForSelect';
import { getLogoUrlFromDomainName } from '~/utils';
import { logError } from '~/utils/logError';
type OwnProps = {
entityType: Entity;
@@ -36,7 +37,7 @@ export const ChipDisplay = ({
);
}
default:
console.warn(
logError(
`Unknown relation type: "${entityType}" in DoubleTextChipDisplay`,
);
return <> </>;