Add no-console eslint rule (#1890)
* Add no-console eslint rule * Remove unused test
This commit is contained in:
@@ -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
-1
@@ -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 <> </>;
|
||||
|
||||
Reference in New Issue
Block a user