lint: migrate prettier to oxfmt (#20783)
Most changes are `implements` being unwrapped this is not a oxfmt regression Prettier in 3.7 (we're on 3.1) changed this behaviour prettier blog [post](https://prettier.io/blog/2025/11/27/3.7.0#change-18094) This unifies our linting tooling --------- Co-authored-by: github-actions <github-actions@twenty.com> Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
+1
-3
@@ -10,9 +10,7 @@ import { type Observable, catchError } from 'rxjs';
|
||||
import { calendarChannelGraphqlApiExceptionHandler } from 'src/engine/metadata-modules/calendar-channel/utils/calendar-channel-graphql-api-exception-handler.util';
|
||||
|
||||
@Injectable()
|
||||
export class CalendarChannelGraphqlApiExceptionInterceptor
|
||||
implements NestInterceptor
|
||||
{
|
||||
export class CalendarChannelGraphqlApiExceptionInterceptor implements NestInterceptor {
|
||||
intercept(
|
||||
_context: ExecutionContext,
|
||||
next: CallHandler,
|
||||
|
||||
+1
-3
@@ -10,9 +10,7 @@ import { type Observable, catchError } from 'rxjs';
|
||||
import { commandMenuItemGraphqlApiExceptionHandler } from 'src/engine/metadata-modules/command-menu-item/utils/command-menu-item-graphql-api-exception-handler.util';
|
||||
|
||||
@Injectable()
|
||||
export class CommandMenuItemGraphqlApiExceptionInterceptor
|
||||
implements NestInterceptor
|
||||
{
|
||||
export class CommandMenuItemGraphqlApiExceptionInterceptor implements NestInterceptor {
|
||||
intercept(
|
||||
_context: ExecutionContext,
|
||||
next: CallHandler,
|
||||
|
||||
+1
-3
@@ -10,9 +10,7 @@ import { type Observable, catchError } from 'rxjs';
|
||||
import { connectedAccountGraphqlApiExceptionHandler } from 'src/engine/metadata-modules/connected-account/utils/connected-account-graphql-api-exception-handler.util';
|
||||
|
||||
@Injectable()
|
||||
export class ConnectedAccountGraphqlApiExceptionInterceptor
|
||||
implements NestInterceptor
|
||||
{
|
||||
export class ConnectedAccountGraphqlApiExceptionInterceptor implements NestInterceptor {
|
||||
intercept(
|
||||
_context: ExecutionContext,
|
||||
next: CallHandler,
|
||||
|
||||
+3
-3
@@ -7,9 +7,9 @@ import { type APP_LOCALES } from 'twenty-shared/translations';
|
||||
import { FieldMetadataStandardOverridesProperties } from 'src/engine/metadata-modules/field-metadata/types/field-metadata-standard-overrides-properties.type';
|
||||
|
||||
@ObjectType('StandardOverrides')
|
||||
export class FieldStandardOverridesDTO
|
||||
implements Partial<Record<FieldMetadataStandardOverridesProperties, unknown>>
|
||||
{
|
||||
export class FieldStandardOverridesDTO implements Partial<
|
||||
Record<FieldMetadataStandardOverridesProperties, unknown>
|
||||
> {
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@Field(() => String, { nullable: true })
|
||||
|
||||
+2
-2
@@ -57,8 +57,8 @@ import { ViewSortEntity } from 'src/engine/metadata-modules/view-sort/entities/v
|
||||
])
|
||||
@Index('IDX_FIELD_METADATA_WORKSPACE_ID', ['workspaceId'])
|
||||
export class FieldMetadataEntity<
|
||||
TFieldMetadataType extends FieldMetadataType = FieldMetadataType,
|
||||
>
|
||||
TFieldMetadataType extends FieldMetadataType = FieldMetadataType,
|
||||
>
|
||||
extends SyncableEntity
|
||||
implements Required<FieldMetadataEntity>
|
||||
{
|
||||
|
||||
+1
-3
@@ -10,9 +10,7 @@ import { type Observable, catchError } from 'rxjs';
|
||||
import { fieldMetadataGraphqlApiExceptionHandler } from 'src/engine/metadata-modules/field-metadata/utils/field-metadata-graphql-api-exception-handler.util';
|
||||
|
||||
@Injectable()
|
||||
export class FieldMetadataGraphqlApiExceptionInterceptor
|
||||
implements NestInterceptor
|
||||
{
|
||||
export class FieldMetadataGraphqlApiExceptionInterceptor implements NestInterceptor {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
intercept(_context: ExecutionContext, next: CallHandler): Observable<any> {
|
||||
return next
|
||||
|
||||
+1
-3
@@ -11,9 +11,7 @@ import {
|
||||
|
||||
@Catch(FlatEntityMapsException)
|
||||
@Injectable()
|
||||
export class FlatEntityMapsGraphqlApiExceptionFilter
|
||||
implements ExceptionFilter
|
||||
{
|
||||
export class FlatEntityMapsGraphqlApiExceptionFilter implements ExceptionFilter {
|
||||
catch(exception: FlatEntityMapsException) {
|
||||
switch (exception.code) {
|
||||
case FlatEntityMapsExceptionCode.RELATION_UNIVERSAL_IDENTIFIER_NOT_FOUND:
|
||||
|
||||
+4
-4
@@ -15,10 +15,10 @@ type IsUniversalMappedProperty<
|
||||
|
||||
export type FlatEntityUpdate<
|
||||
T extends AllMetadataName,
|
||||
MetadataPropertyConfig = (typeof ALL_ENTITY_PROPERTIES_CONFIGURATION_BY_METADATA_NAME)[T],
|
||||
TComparedKeys extends
|
||||
keyof MetadataPropertyConfig = MetadataEntityComparablePropertyName<T> &
|
||||
keyof MetadataPropertyConfig,
|
||||
MetadataPropertyConfig =
|
||||
(typeof ALL_ENTITY_PROPERTIES_CONFIGURATION_BY_METADATA_NAME)[T],
|
||||
TComparedKeys extends keyof MetadataPropertyConfig =
|
||||
MetadataEntityComparablePropertyName<T> & keyof MetadataPropertyConfig,
|
||||
> = Partial<
|
||||
Pick<
|
||||
MetadataFlatEntity<T>,
|
||||
|
||||
+2
-4
@@ -55,10 +55,8 @@ type ResolvedUniversalIdentifiers<
|
||||
|
||||
export const resolveEntityRelationUniversalIdentifiers = <
|
||||
T extends AllMetadataName,
|
||||
TProvidedKeys extends Extract<
|
||||
MetadataManyToOneJoinColumn<T>,
|
||||
string
|
||||
> = Extract<MetadataManyToOneJoinColumn<T>, string>,
|
||||
TProvidedKeys extends Extract<MetadataManyToOneJoinColumn<T>, string> =
|
||||
Extract<MetadataManyToOneJoinColumn<T>, string>,
|
||||
>({
|
||||
metadataName,
|
||||
foreignKeyValues,
|
||||
|
||||
+4
-1
@@ -1,5 +1,8 @@
|
||||
import { defineFrontComponent } from 'twenty-sdk/define';
|
||||
import { useFrontComponentExecutionContext, useUserId } from 'twenty-sdk/front-component';
|
||||
import {
|
||||
useFrontComponentExecutionContext,
|
||||
useUserId,
|
||||
} from 'twenty-sdk/front-component';
|
||||
import { useState } from 'react';
|
||||
|
||||
const HelloWorld = () => {
|
||||
|
||||
+4
-1
@@ -1,5 +1,8 @@
|
||||
import { defineFrontComponent } from 'twenty-sdk/define';
|
||||
import { enqueueSnackbar, unmountFrontComponent } from 'twenty-sdk/front-component';
|
||||
import {
|
||||
enqueueSnackbar,
|
||||
unmountFrontComponent,
|
||||
} from 'twenty-sdk/front-component';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
const ShowNotification = () => {
|
||||
|
||||
+1
-3
@@ -10,9 +10,7 @@ import { type Observable, catchError } from 'rxjs';
|
||||
import { frontComponentGraphqlApiExceptionHandler } from 'src/engine/metadata-modules/front-component/utils/front-component-graphql-api-exception-handler.util';
|
||||
|
||||
@Injectable()
|
||||
export class FrontComponentGraphqlApiExceptionInterceptor
|
||||
implements NestInterceptor
|
||||
{
|
||||
export class FrontComponentGraphqlApiExceptionInterceptor implements NestInterceptor {
|
||||
intercept(
|
||||
_context: ExecutionContext,
|
||||
next: CallHandler,
|
||||
|
||||
+1
-3
@@ -15,9 +15,7 @@ import { IndexMetadataEntity } from 'src/engine/metadata-modules/index-metadata/
|
||||
import type { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity';
|
||||
|
||||
@Entity({ name: 'indexFieldMetadata', schema: 'core' })
|
||||
export class IndexFieldMetadataEntity
|
||||
implements Required<IndexFieldMetadataEntity>
|
||||
{
|
||||
export class IndexFieldMetadataEntity implements Required<IndexFieldMetadataEntity> {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
|
||||
+1
-3
@@ -10,9 +10,7 @@ import { type Observable, catchError } from 'rxjs';
|
||||
import { messageChannelGraphqlApiExceptionHandler } from 'src/engine/metadata-modules/message-channel/utils/message-channel-graphql-api-exception-handler.util';
|
||||
|
||||
@Injectable()
|
||||
export class MessageChannelGraphqlApiExceptionInterceptor
|
||||
implements NestInterceptor
|
||||
{
|
||||
export class MessageChannelGraphqlApiExceptionInterceptor implements NestInterceptor {
|
||||
intercept(
|
||||
_context: ExecutionContext,
|
||||
next: CallHandler,
|
||||
|
||||
+1
-3
@@ -10,9 +10,7 @@ import { type Observable, catchError } from 'rxjs';
|
||||
import { messageFolderGraphqlApiExceptionHandler } from 'src/engine/metadata-modules/message-folder/utils/message-folder-graphql-api-exception-handler.util';
|
||||
|
||||
@Injectable()
|
||||
export class MessageFolderGraphqlApiExceptionInterceptor
|
||||
implements NestInterceptor
|
||||
{
|
||||
export class MessageFolderGraphqlApiExceptionInterceptor implements NestInterceptor {
|
||||
intercept(
|
||||
_context: ExecutionContext,
|
||||
next: CallHandler,
|
||||
|
||||
+1
-3
@@ -10,9 +10,7 @@ import { type Observable, catchError } from 'rxjs';
|
||||
import { navigationMenuItemGraphqlApiExceptionHandler } from 'src/engine/metadata-modules/navigation-menu-item/utils/navigation-menu-item-graphql-api-exception-handler.util';
|
||||
|
||||
@Injectable()
|
||||
export class NavigationMenuItemGraphqlApiExceptionInterceptor
|
||||
implements NestInterceptor
|
||||
{
|
||||
export class NavigationMenuItemGraphqlApiExceptionInterceptor implements NestInterceptor {
|
||||
intercept(
|
||||
_context: ExecutionContext,
|
||||
next: CallHandler,
|
||||
|
||||
+1
-3
@@ -10,9 +10,7 @@ import { type Observable, catchError } from 'rxjs';
|
||||
import { objectMetadataGraphqlApiExceptionHandler } from 'src/engine/metadata-modules/object-metadata/utils/object-metadata-graphql-api-exception-handler.util';
|
||||
|
||||
@Injectable()
|
||||
export class ObjectMetadataGraphqlApiExceptionInterceptor
|
||||
implements NestInterceptor
|
||||
{
|
||||
export class ObjectMetadataGraphqlApiExceptionInterceptor implements NestInterceptor {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
intercept(_context: ExecutionContext, next: CallHandler): Observable<any> {
|
||||
return next
|
||||
|
||||
+1
-3
@@ -29,9 +29,7 @@ import { RatioAggregateConfigDTO } from 'src/engine/metadata-modules/page-layout
|
||||
import { WidgetConfigurationType } from 'src/engine/metadata-modules/page-layout-widget/enums/widget-configuration-type.type';
|
||||
|
||||
@ObjectType('AggregateChartConfiguration')
|
||||
export class AggregateChartConfigurationDTO
|
||||
implements AggregateChartConfiguration
|
||||
{
|
||||
export class AggregateChartConfigurationDTO implements AggregateChartConfiguration {
|
||||
@Field(() => WidgetConfigurationType)
|
||||
@IsIn([WidgetConfigurationType.AGGREGATE_CHART])
|
||||
@IsNotEmpty()
|
||||
|
||||
+1
-3
@@ -6,9 +6,7 @@ import { type FieldRichTextConfiguration } from 'twenty-shared/types';
|
||||
import { WidgetConfigurationType } from 'src/engine/metadata-modules/page-layout-widget/enums/widget-configuration-type.type';
|
||||
|
||||
@ObjectType('FieldRichTextConfiguration')
|
||||
export class FieldRichTextConfigurationDTO
|
||||
implements FieldRichTextConfiguration
|
||||
{
|
||||
export class FieldRichTextConfigurationDTO implements FieldRichTextConfiguration {
|
||||
@Field(() => WidgetConfigurationType)
|
||||
@IsIn([WidgetConfigurationType.FIELD_RICH_TEXT])
|
||||
@IsNotEmpty()
|
||||
|
||||
+1
-3
@@ -10,9 +10,7 @@ import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/
|
||||
import { WidgetConfigurationType } from 'src/engine/metadata-modules/page-layout-widget/enums/widget-configuration-type.type';
|
||||
|
||||
@ObjectType('FrontComponentConfiguration')
|
||||
export class FrontComponentConfigurationDTO
|
||||
implements FrontComponentConfiguration
|
||||
{
|
||||
export class FrontComponentConfigurationDTO implements FrontComponentConfiguration {
|
||||
@Field(() => WidgetConfigurationType)
|
||||
@IsIn([WidgetConfigurationType.FRONT_COMPONENT])
|
||||
@IsNotEmpty()
|
||||
|
||||
+1
-3
@@ -8,9 +8,7 @@ import { RichTextBodyDTO } from 'src/engine/metadata-modules/page-layout-widget/
|
||||
import { WidgetConfigurationType } from 'src/engine/metadata-modules/page-layout-widget/enums/widget-configuration-type.type';
|
||||
|
||||
@ObjectType('StandaloneRichTextConfiguration')
|
||||
export class StandaloneRichTextConfigurationDTO
|
||||
implements StandaloneRichTextConfiguration
|
||||
{
|
||||
export class StandaloneRichTextConfigurationDTO implements StandaloneRichTextConfiguration {
|
||||
@Field(() => WidgetConfigurationType)
|
||||
@IsIn([WidgetConfigurationType.STANDALONE_RICH_TEXT])
|
||||
@IsNotEmpty()
|
||||
|
||||
+1
-3
@@ -6,9 +6,7 @@ import { type WorkflowVersionConfiguration } from 'twenty-shared/types';
|
||||
import { WidgetConfigurationType } from 'src/engine/metadata-modules/page-layout-widget/enums/widget-configuration-type.type';
|
||||
|
||||
@ObjectType('WorkflowVersionConfiguration')
|
||||
export class WorkflowVersionConfigurationDTO
|
||||
implements WorkflowVersionConfiguration
|
||||
{
|
||||
export class WorkflowVersionConfigurationDTO implements WorkflowVersionConfiguration {
|
||||
@Field(() => WidgetConfigurationType)
|
||||
@IsIn([WidgetConfigurationType.WORKFLOW_VERSION])
|
||||
@IsNotEmpty()
|
||||
|
||||
+3
-3
@@ -44,9 +44,9 @@ export type PageLayoutWidgetOverrides = {
|
||||
)
|
||||
@Index('IDX_PAGE_LAYOUT_WIDGET_OBJECT_METADATA_ID', ['objectMetadataId'])
|
||||
export class PageLayoutWidgetEntity<
|
||||
TWidgetConfigurationType extends
|
||||
WidgetConfigurationType = WidgetConfigurationType,
|
||||
>
|
||||
TWidgetConfigurationType extends WidgetConfigurationType =
|
||||
WidgetConfigurationType,
|
||||
>
|
||||
extends OverridableEntity<PageLayoutWidgetOverrides>
|
||||
implements Required<PageLayoutWidgetEntity>
|
||||
{
|
||||
|
||||
+1
-3
@@ -6,9 +6,7 @@ import { RowLevelPermissionPredicateException } from 'src/engine/metadata-module
|
||||
import { rowLevelPermissionPredicateGraphqlApiExceptionHandler } from 'src/engine/metadata-modules/row-level-permission-predicate/utils/row-level-permission-predicate-graphql-api-exception-handler.util';
|
||||
|
||||
@Catch(RowLevelPermissionPredicateException)
|
||||
export class RowLevelPermissionPredicateGraphqlApiExceptionFilter
|
||||
implements ExceptionFilter
|
||||
{
|
||||
export class RowLevelPermissionPredicateGraphqlApiExceptionFilter implements ExceptionFilter {
|
||||
catch(exception: RowLevelPermissionPredicateException) {
|
||||
return rowLevelPermissionPredicateGraphqlApiExceptionHandler(exception);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user