The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
fix(twenty-front): fix tsconfig to properly typecheck all files with tsgo (#17380)
Félix Malfait41dd9856e619
diff --git a/packages/create-twenty-app/tsconfig.json b/packages/create-twenty-app/tsconfig.jsonindex b37cc0e8e8c..d5bed1aa712 100644--- a/packages/create-twenty-app/tsconfig.json+++ b/packages/create-twenty-app/tsconfig.json@@ -1,4 +1,5 @@{+ "extends": "../../tsconfig.base.json","compilerOptions": {"allowJs": false,"esModuleInterop": false,@@ -8,19 +9,17 @@"noImplicitAny": true,"strictBindCallApply": false,"noEmit": true,+ "types": ["jest", "node"],"paths": {"@/*": ["./src/*"]}},- "files": [],- "include": [],- "references": [- {- "path": "./tsconfig.lib.json"- },- {- "path": "./tsconfig.spec.json"- }- ],- "extends": "../../tsconfig.base.json"+ "include": [+ "src/**/*.ts",+ "src/**/*.tsx",+ "src/**/*.d.ts",+ "**/__mocks__/**/*",+ "vite.config.ts",+ "jest.config.mjs"+ ]}diff --git a/packages/create-twenty-app/tsconfig.spec.json b/packages/create-twenty-app/tsconfig.spec.jsondeleted file mode 100644index 8c23564bcb2..00000000000--- a/packages/create-twenty-app/tsconfig.spec.json+++ /dev/null@@ -1,16 +0,0 @@-{- "extends": "./tsconfig.json",- "compilerOptions": {- "types": ["jest", "node"]- },- "include": [- "**/__mocks__/**/*",- "vite.config.ts",- "jest.config.mjs",- "src/**/*.d.ts",- "src/**/*.spec.ts",- "src/**/*.spec.tsx",- "src/**/*.test.ts",- "src/**/*.test.tsx"- ]-}diff --git a/packages/twenty-apps/community/fireflies/README.md b/packages/twenty-apps/community/fireflies/README.mdindex 91ef7c4a0eb..55fed806219 100644--- a/packages/twenty-apps/community/fireflies/README.md+++ b/packages/twenty-apps/community/fireflies/README.md@@ -230,7 +230,7 @@ npm run test -- --watchnpx twenty-cli app dev# Type checking-npx tsc --noEmit+npx tsgo --noEmit```## Testingdiff --git a/packages/twenty-emails/.gitignore b/packages/twenty-emails/.gitignoreindex 1f18a594eea..dc1c7a3bb89 100644--- a/packages/twenty-emails/.gitignore+++ b/packages/twenty-emails/.gitignore@@ -1,2 +1,8 @@dist.react-email/++# Build artifacts+src/**/*.js+src/**/*.js.map+vite.config.js+vite.config.js.mapdiff --git a/packages/twenty-emails/eslint.config.mjs b/packages/twenty-emails/eslint.config.mjsindex d4c0afa7a73..40df3cc7d0b 100644--- a/packages/twenty-emails/eslint.config.mjs+++ b/packages/twenty-emails/eslint.config.mjs@@ -23,7 +23,7 @@ export default [languageOptions: {parser: typescriptParser,parserOptions: {- project: [path.resolve(__dirname, 'tsconfig.*.json')],+ project: [path.resolve(__dirname, 'tsconfig.json')],ecmaFeatures: {jsx: true,},diff --git a/packages/twenty-emails/tsconfig.json b/packages/twenty-emails/tsconfig.jsonindex 02f8335547b..8c1ab2e0c23 100644--- a/packages/twenty-emails/tsconfig.json+++ b/packages/twenty-emails/tsconfig.json@@ -1,23 +1,20 @@{- "type": "module",+ "extends": "../../tsconfig.base.json","compilerOptions": {"jsx": "react-jsx","allowJs": false,"esModuleInterop": false,"allowSyntheticDefaultImports": true,"strict": true,- "types": ["vite/client"],+ "types": ["vite/client", "node"],"paths": {"@/*": ["./src/*"],"src/*": ["./src/*"]}},- "files": [],- "include": ["vite.config.ts"],- "references": [- {- "path": "./tsconfig.lib.json"- }- ],- "extends": "../../tsconfig.base.json"+ "include": [+ "src/**/*.ts",+ "src/**/*.tsx",+ "vite.config.ts"+ ]}diff --git a/packages/twenty-emails/tsconfig.lib.json b/packages/twenty-emails/tsconfig.lib.jsonindex 9765fe7d45a..9921075dc60 100644--- a/packages/twenty-emails/tsconfig.lib.json+++ b/packages/twenty-emails/tsconfig.lib.json@@ -4,21 +4,13 @@"outDir": "../../.cache/tsc","composite": true,"declaration": true,- "types": [- "node",- "@nx/react/typings/image.d.ts",- "vite/client"- ]+ "types": ["node", "@nx/react/typings/image.d.ts", "vite/client"]},+ "include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"],"exclude": ["**/*.spec.ts","**/*.test.ts","**/*.spec.tsx",- "**/*.test.tsx",- "**/*.spec.js",- "**/*.test.js",- "**/*.spec.jsx",- "**/*.test.jsx"- ],- "include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]+ "**/*.test.tsx"+ ]}diff --git a/packages/twenty-emails/vite.config.ts b/packages/twenty-emails/vite.config.tsindex e4b3bb6715a..d2d720b24f7 100644--- a/packages/twenty-emails/vite.config.ts+++ b/packages/twenty-emails/vite.config.ts@@ -10,6 +10,13 @@ export default defineConfig({root: __dirname,cacheDir: '../../node_modules/.vite/packages/twenty-emails',+ resolve: {+ alias: {+ '@/': path.resolve(__dirname, 'src') + '/',+ 'src/': path.resolve(__dirname, 'src') + '/',+ },+ },+plugins: [react({plugins: [['@lingui/swc-plugin', {}]],diff --git a/packages/twenty-eslint-rules/jest.config.mjs b/packages/twenty-eslint-rules/jest.config.mjsindex 6afffb1cc59..2d4cc9ad1ab 100644--- a/packages/twenty-eslint-rules/jest.config.mjs+++ b/packages/twenty-eslint-rules/jest.config.mjs@@ -4,7 +4,7 @@ export default {silent: false,preset: '../../jest.preset.js',transform: {- '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],+ '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.json' }],},moduleFileExtensions: ['ts', 'js', 'html'],coverageDirectory: '../../coverage/packages/twenty-eslint-rules',diff --git a/packages/twenty-eslint-rules/tsconfig.json b/packages/twenty-eslint-rules/tsconfig.jsonindex 889d62f0891..c94e8d091ec 100644--- a/packages/twenty-eslint-rules/tsconfig.json+++ b/packages/twenty-eslint-rules/tsconfig.json@@ -4,16 +4,8 @@"outDir": "../../.cache/tsc","esModuleInterop": true,"moduleResolution": "node16",- "module": "node16"+ "module": "node16",+ "types": ["jest", "node"]},- "files": [],- "include": [],- "references": [- {- "path": "./tsconfig.lint.json"- },- {- "path": "./tsconfig.spec.json"- }- ]+ "include": ["**/*.ts", "jest.config.mjs"]}diff --git a/packages/twenty-eslint-rules/tsconfig.lint.json b/packages/twenty-eslint-rules/tsconfig.lint.jsondeleted file mode 100644index 594b1938e83..00000000000--- a/packages/twenty-eslint-rules/tsconfig.lint.json+++ /dev/null@@ -1,8 +0,0 @@-{- "extends": "./tsconfig.json",- "compilerOptions": {- "types": ["node"]- },- "exclude": ["**/*.spec.ts"],- "include": ["**/*.ts"]-}diff --git a/packages/twenty-eslint-rules/tsconfig.spec.json b/packages/twenty-eslint-rules/tsconfig.spec.jsondeleted file mode 100644index 472492077a7..00000000000--- a/packages/twenty-eslint-rules/tsconfig.spec.json+++ /dev/null@@ -1,7 +0,0 @@-{- "extends": "./tsconfig.json",- "compilerOptions": {- "types": ["jest", "node"]- },- "include": ["jest.config.mjs", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]-}diff --git a/packages/twenty-front/eslint.config.mjs b/packages/twenty-front/eslint.config.mjsindex 27a74299fbf..451a349873d 100644--- a/packages/twenty-front/eslint.config.mjs+++ b/packages/twenty-front/eslint.config.mjs@@ -49,11 +49,7 @@ const config = [languageOptions: {parser: typescriptParser,parserOptions: {- project: [- path.resolve(__dirname, 'tsconfig.dev.json'),- path.resolve(__dirname, 'tsconfig.storybook.json'),- path.resolve(__dirname, 'tsconfig.spec.json'),- ],+ project: [path.resolve(__dirname, 'tsconfig.json')],ecmaFeatures: {jsx: true,},diff --git a/packages/twenty-front/jest.config.mjs b/packages/twenty-front/jest.config.mjsindex 911af7b214b..d3a20ae7130 100644--- a/packages/twenty-front/jest.config.mjs+++ b/packages/twenty-front/jest.config.mjs@@ -6,7 +6,7 @@ import { fileURLToPath } from 'url';const __filename = fileURLToPath(import.meta.url);const __dirname = dirname(__filename);-const tsConfigPath = resolve(__dirname, './tsconfig.spec.json');+const tsConfigPath = resolve(__dirname, './tsconfig.json');const tsConfig = JSON.parse(readFileSync(tsConfigPath, 'utf8'));// eslint-disable-next-line no-undef@@ -55,7 +55,7 @@ const jestConfig = {'<rootDir>/__mocks__/imageMockFront.js','\\.css$': '<rootDir>/__mocks__/styleMock.js',...pathsToModuleNameMapper(tsConfig.compilerOptions.paths, {- prefix: '<rootDir>/../../',+ prefix: '<rootDir>/',}),},moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],diff --git a/packages/twenty-front/src/generated/graphql.ts b/packages/twenty-front/src/generated/graphql.tsindex faf07912b6b..d981e0f3839 100644--- a/packages/twenty-front/src/generated/graphql.ts+++ b/packages/twenty-front/src/generated/graphql.ts@@ -5332,7 +5332,7 @@ export type SearchQueryVariables = Exact<{}>;-export type SearchQuery = { __typename?: 'Query', search: { __typename?: 'SearchResultConnection', edges: Array<{ __typename?: 'SearchResultEdge', cursor: string, node: { __typename?: 'SearchRecord', recordId: any, objectNameSingular: string, label: string, imageUrl?: string | null, tsRankCD: number, tsRank: number } }>, pageInfo: { __typename?: 'SearchResultPageInfo', hasNextPage: boolean, endCursor?: string | null } } };+export type SearchQuery = { __typename?: 'Query', search: { __typename?: 'SearchResultConnection', edges: Array<{ __typename?: 'SearchResultEdge', cursor: string, node: { __typename?: 'SearchRecord', recordId: any, objectNameSingular: string, objectLabelSingular: string, label: string, imageUrl?: string | null, tsRankCD: number, tsRank: number } }>, pageInfo: { __typename?: 'SearchResultPageInfo', hasNextPage: boolean, endCursor?: string | null } } };export type PageLayoutWidgetFragmentFragment = { __typename?: 'PageLayoutWidget', id: any, title: string, type: WidgetType, objectMetadataId?: any | null, createdAt: string, updatedAt: string, deletedAt?: string | null, pageLayoutTabId: any, gridPosition: { __typename?: 'GridPosition', column: number, columnSpan: number, row: number, rowSpan: number }, configuration: { __typename?: 'AggregateChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, label?: string | null, displayDataLabel?: boolean | null, format?: string | null, description?: string | null, filter?: any | null, prefix?: string | null, suffix?: string | null, timezone?: string | null, firstDayOfTheWeek?: number | null, ratioAggregateConfig?: { __typename?: 'RatioAggregateConfig', fieldMetadataId: any, optionValue: string } | null } | { __typename?: 'BarChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: any, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array<string> | null, secondaryAxisGroupByFieldMetadataId?: any | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array<string> | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, groupMode?: BarChartGroupMode | null, layout: BarChartLayout, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'CalendarConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'EmailsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldRichTextConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FilesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'GaugeChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, displayDataLabel?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'IframeConfiguration', configurationType: WidgetConfigurationType, url?: string | null } | { __typename?: 'LineChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: any, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array<string> | null, secondaryAxisGroupByFieldMetadataId?: any | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array<string> | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, isStacked?: boolean | null, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'NotesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'PieChartConfiguration', configurationType: WidgetConfigurationType, groupByFieldMetadataId: any, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, groupBySubFieldName?: string | null, dateGranularity?: ObjectRecordGroupByDateGranularity | null, orderBy?: GraphOrderBy | null, manualSortOrder?: Array<string> | null, displayDataLabel?: boolean | null, showCenterMetric?: boolean | null, displayLegend?: boolean | null, hideEmptyCategory?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'StandaloneRichTextConfiguration', configurationType: WidgetConfigurationType, body: { __typename?: 'RichTextV2Body', blocknote?: string | null, markdown?: string | null } } | { __typename?: 'TasksConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'TimelineConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'ViewConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowRunConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowVersionConfiguration', configurationType: WidgetConfigurationType } };@@ -5939,6 +5939,7 @@ export const SearchDocument = gql`node {recordIdobjectNameSingular+ objectLabelSingularlabelimageUrltsRankCDdiff --git a/packages/twenty-front/src/modules/command-menu/graphql/queries/search.ts b/packages/twenty-front/src/modules/command-menu/graphql/queries/search.tsindex f96bc589fc6..f02bae3bf9e 100644--- a/packages/twenty-front/src/modules/command-menu/graphql/queries/search.ts+++ b/packages/twenty-front/src/modules/command-menu/graphql/queries/search.ts@@ -21,6 +21,7 @@ export const SEARCH_QUERY = gql`node {recordIdobjectNameSingular+ objectLabelSingularlabelimageUrltsRankCDdiff --git a/packages/twenty-front/src/modules/metadata-error-handler/hooks/useMetadataErrorHandler.ts b/packages/twenty-front/src/modules/metadata-error-handler/hooks/useMetadataErrorHandler.tsindex edcf41c8bd3..1c71fd0731b 100644--- a/packages/twenty-front/src/modules/metadata-error-handler/hooks/useMetadataErrorHandler.ts+++ b/packages/twenty-front/src/modules/metadata-error-handler/hooks/useMetadataErrorHandler.ts@@ -44,6 +44,7 @@ export const useMetadataErrorHandler = () => {viewFilterGroup: t`view filter group`,commandMenuItem: t`command menu item`,frontComponent: t`front component`,+ navigationMenuItem: t`navigation menu item`,} as const satisfies Record<AllMetadataName, string>;const handleMetadataError = (diff --git a/packages/twenty-front/src/modules/object-metadata/types/FieldMetadataItem.ts b/packages/twenty-front/src/modules/object-metadata/types/FieldMetadataItem.tsindex abc16612fbe..398e5c17e54 100644--- a/packages/twenty-front/src/modules/object-metadata/types/FieldMetadataItem.ts+++ b/packages/twenty-front/src/modules/object-metadata/types/FieldMetadataItem.ts@@ -17,9 +17,15 @@ export type FieldMetadataItemOption = PartialFieldMetadataItemOption & {export type FieldMetadataItem = Omit<Field,- '__typename' | 'defaultValue' | 'options' | 'relation' | 'morphRelations'+ | '__typename'+ | 'applicationId'+ | 'defaultValue'+ | 'options'+ | 'relation'+ | 'morphRelations'> & {__typename?: string;+ applicationId?: string;defaultValue?: any;options?: FieldMetadataItemOption[] | null;relation?: FieldMetadataItemRelation | null;diff --git a/packages/twenty-front/src/modules/object-metadata/types/ObjectMetadataItem.ts b/packages/twenty-front/src/modules/object-metadata/types/ObjectMetadataItem.tsindex 9f06af9dfcc..f7885734c17 100644--- a/packages/twenty-front/src/modules/object-metadata/types/ObjectMetadataItem.ts+++ b/packages/twenty-front/src/modules/object-metadata/types/ObjectMetadataItem.ts@@ -6,6 +6,7 @@ import { type FieldMetadataItem } from './FieldMetadataItem';export type ObjectMetadataItem = Omit<GeneratedObject,| '__typename'+ | 'applicationId'| 'fields'| 'indexMetadatas'| 'labelIdentifierFieldMetadataId'@@ -13,6 +14,7 @@ export type ObjectMetadataItem = Omit<| 'indexMetadataList'> & {__typename?: string;+ applicationId?: string;fields: FieldMetadataItem[];readableFields: FieldMetadataItem[];updatableFields: FieldMetadataItem[];diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterFieldSelectMenu.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterFieldSelectMenu.tsxindex 495c337e595..c6de0d424d5 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterFieldSelectMenu.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterFieldSelectMenu.tsx@@ -17,7 +17,7 @@ import { ObjectFilterDropdownFilterSelectMenuItem } from '@/object-record/objectimport { fieldMetadataItemIdUsedInDropdownComponentState } from '@/object-record/object-filter-dropdown/states/fieldMetadataItemIdUsedInDropdownComponentState';import { objectFilterDropdownIsSelectingCompositeFieldComponentState } from '@/object-record/object-filter-dropdown/states/objectFilterDropdownIsSelectingCompositeFieldComponentState';import { objectFilterDropdownSubMenuFieldTypeComponentState } from '@/object-record/object-filter-dropdown/states/objectFilterDropdownSubMenuFieldTypeComponentState';-import { isCompositeFieldType } from '@/object-record/object-filter-dropdown/utils/isCompositeFieldType';+import { isCompositeFilterableFieldType } from '@/object-record/object-filter-dropdown/utils/isCompositeFilterableFieldType';import { visibleRecordFieldsComponentSelector } from '@/object-record/record-field/states/visibleRecordFieldsComponentSelector';import { useFilterableFieldMetadataItems } from '@/object-record/record-filter/hooks/useFilterableFieldMetadataItems';import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';@@ -117,7 +117,7 @@ export const AdvancedFilterFieldSelectMenu = ({recordFilterId,});- if (isCompositeFieldType(filterType)) {+ if (isCompositeFilterableFieldType(filterType)) {setObjectFilterDropdownSubMenuFieldType(filterType);setFieldMetadataItemIdUsedInDropdown(selectedFieldMetadataItem.id);diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/utils/computeDraftValueFromString.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/utils/computeDraftValueFromString.tsindex c610258ecad..1645213f6f8 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/utils/computeDraftValueFromString.ts+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/utils/computeDraftValueFromString.ts@@ -54,6 +54,13 @@ export const computeDraftValueFromString = <FieldValue>({if (isFieldAddress(fieldDefinition)) {return {addressStreet1: value,+ addressStreet2: null,+ addressCity: null,+ addressState: null,+ addressPostcode: null,+ addressCountry: null,+ addressLat: null,+ addressLng: null,} as FieldInputDraftValue<FieldValue>;}diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/utils/computeEmptyDraftValue.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/utils/computeEmptyDraftValue.tsindex d0a7ced4190..d34ec911960 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/utils/computeEmptyDraftValue.ts+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/utils/computeEmptyDraftValue.ts@@ -48,7 +48,7 @@ export const computeEmptyDraftValue = <FieldValue>({addressState: '',addressCountry: '',addressPostcode: '',- } as FieldInputDraftValue<FieldValue>;+ } as unknown as FieldInputDraftValue<FieldValue>;}if (isFieldCurrency(fieldDefinition)) {diff --git a/packages/twenty-front/src/modules/object-record/record-picker/multiple-record-picker/utils/__tests__/sortMorphItems.test.ts b/packages/twenty-front/src/modules/object-record/record-picker/multiple-record-picker/utils/__tests__/sortMorphItems.test.tsindex 7b8ea299f5a..042aa2c828f 100644--- a/packages/twenty-front/src/modules/object-record/record-picker/multiple-record-picker/utils/__tests__/sortMorphItems.test.ts+++ b/packages/twenty-front/src/modules/object-record/record-picker/multiple-record-picker/utils/__tests__/sortMorphItems.test.ts@@ -16,6 +16,7 @@ const createSearchRecord = (recordId: string): SearchRecord => ({recordId,label: `Record ${recordId}`,objectNameSingular: 'person',+ objectLabelSingular: 'Person',tsRank: 0,tsRankCD: 0,});diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionFieldSelectFieldMenu.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionFieldSelectFieldMenu.tsxindex bc764f92571..db1d1e805b7 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionFieldSelectFieldMenu.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionFieldSelectFieldMenu.tsx@@ -14,7 +14,7 @@ import { fieldMetadataItemIdUsedInDropdownComponentState } from '@/object-recordimport { objectFilterDropdownIsSelectingCompositeFieldComponentState } from '@/object-record/object-filter-dropdown/states/objectFilterDropdownIsSelectingCompositeFieldComponentState';import { objectFilterDropdownSearchInputComponentState } from '@/object-record/object-filter-dropdown/states/objectFilterDropdownSearchInputComponentState';import { objectFilterDropdownSubMenuFieldTypeComponentState } from '@/object-record/object-filter-dropdown/states/objectFilterDropdownSubMenuFieldTypeComponentState';-import { isCompositeFieldType } from '@/object-record/object-filter-dropdown/utils/isCompositeFieldType';+import { isCompositeFilterableFieldType } from '@/object-record/object-filter-dropdown/utils/isCompositeFilterableFieldType';import { useFilterableFieldMetadataItems } from '@/object-record/record-filter/hooks/useFilterableFieldMetadataItems';import { RECORD_LEVEL_PERMISSION_PREDICATE_FIELD_TYPES } from '@/settings/roles/role-permissions/object-level-permissions/record-level-permissions/constants/RecordLevelPermissionPredicateFieldTypes';import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';@@ -99,7 +99,7 @@ export const SettingsRolePermissionsObjectLevelRecordLevelPermissionFieldSelectFselectedFieldMetadataItem.type,);- if (isCompositeFieldType(filterType)) {+ if (isCompositeFilterableFieldType(filterType)) {setObjectFilterDropdownSubMenuFieldType(filterType);setFieldMetadataItemIdUsedInDropdown(selectedFieldMetadataItem.id);setObjectFilterDropdownIsSelectingCompositeField(true);diff --git a/packages/twenty-front/src/modules/ui/feedback/dialog-manager/components/Dialog.tsx b/packages/twenty-front/src/modules/ui/feedback/dialog-manager/components/Dialog.tsxindex 6d238958527..7f1839c52ec 100644--- a/packages/twenty-front/src/modules/ui/feedback/dialog-manager/components/Dialog.tsx+++ b/packages/twenty-front/src/modules/ui/feedback/dialog-manager/components/Dialog.tsx@@ -155,7 +155,7 @@ export const Dialog = ({{children}{buttons.map(({ accent, onClick, role, title: key, variant }) => (<StyledDialogButton- onClick={(event) => {+ onClick={(event: React.MouseEvent<HTMLButtonElement>) => {onClose?.();onClick?.(event);}}diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/if-else-action/components/WorkflowEditActionIfElseBody.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/if-else-action/components/WorkflowEditActionIfElseBody.tsxindex 7d416da17b6..ec64670109c 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/if-else-action/components/WorkflowEditActionIfElseBody.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/if-else-action/components/WorkflowEditActionIfElseBody.tsx@@ -272,7 +272,9 @@ export const WorkflowEditActionIfElseBody = ({title={t`Add route`}variant="secondary"size="small"- onClick={(event) => handleAddRoute(event)}+ onClick={(event: React.MouseEvent<HTMLButtonElement>) =>+ handleAddRoute(event)+ }/></>)}diff --git a/packages/twenty-front/tsconfig.build.json b/packages/twenty-front/tsconfig.build.jsonindex c384b58be62..7278f56127c 100644--- a/packages/twenty-front/tsconfig.build.json+++ b/packages/twenty-front/tsconfig.build.json@@ -3,8 +3,16 @@"compilerOptions": {"types": ["node"]},+ "include": [+ "src/**/*.js",+ "src/**/*.jsx",+ "src/**/*.d.ts",+ "src/**/*.ts",+ "src/**/*.tsx"+ ],"exclude": ["**/__mocks__/**/*",+ "**/__tests__/**/*","**/*.spec.ts","**/*.spec.tsx","**/*.stories.ts",@@ -12,12 +20,5 @@"**/*.test.ts","**/*.test.tsx","src/testing/**/*"- ],- "include": [- "src/**/*.js",- "src/**/*.jsx",- "src/**/*.d.ts",- "src/**/*.ts",- "src/**/*.tsx"]}diff --git a/packages/twenty-front/tsconfig.dev.json b/packages/twenty-front/tsconfig.dev.jsondeleted file mode 100644index e03c7a77290..00000000000--- a/packages/twenty-front/tsconfig.dev.json+++ /dev/null@@ -1,21 +0,0 @@-{- "extends": "./tsconfig.json",- "compilerOptions": {- "types": ["node"]- },- "include": [- "src/**/*.js",- "src/**/*.jsx",- "src/**/*.d.ts",- "src/**/*.ts",- "src/**/*.tsx",- "lingui.config.ts",- "jest.config.mjs",- "vite.config.ts",- "vitest.config.ts",- "setupTests.ts"- ],- "exclude": [- "src/testing/**/*"- ]-}diff --git a/packages/twenty-front/tsconfig.json b/packages/twenty-front/tsconfig.jsonindex 33c567774be..089f07da085 100644--- a/packages/twenty-front/tsconfig.json+++ b/packages/twenty-front/tsconfig.json@@ -24,29 +24,29 @@"@/*": ["./src/modules/*"],"~/*": ["./src/*"]},+ "types": ["node", "jest"],"plugins": [{"name": "@styled/typescript-styled-plugin","lint": {- "validProperties": ["container-type"],+ "validProperties": ["container-type"]}}]},- "files": [],- "references": [- {- "path": "./tsconfig.dev.json"- },- {- "path": "./tsconfig.build.json"- },- {- "path": "./tsconfig.spec.json"- },- {- "path": "./tsconfig.storybook.json"- }+ "include": [+ "src/**/*.js",+ "src/**/*.jsx",+ "src/**/*.d.ts",+ "src/**/*.ts",+ "src/**/*.tsx",+ ".storybook/*.ts",+ ".storybook/*.tsx",+ "lingui.config.ts",+ "jest.config.mjs",+ "vite.config.ts",+ "vitest.config.ts",+ "setupTests.ts"],"extends": "../../tsconfig.base.json"}diff --git a/packages/twenty-front/tsconfig.spec.json b/packages/twenty-front/tsconfig.spec.jsondeleted file mode 100644index fca51306a38..00000000000--- a/packages/twenty-front/tsconfig.spec.json+++ /dev/null@@ -1,26 +0,0 @@-{- "extends": "./tsconfig.json",- "compilerOptions": {- "types": ["jest", "node"],- "baseUrl": "../..",- "paths": {- "@/*": ["./packages/twenty-front/src/modules/*"],- "~/*": ["./packages/twenty-front/src/*"]- }- },- "include": [- "**/__mocks__/**/*",- "**/__tests__/**/*",- "jest.config.mjs",- "setupTests.ts",- "src/**/*.d.ts",- "src/**/*.spec.ts",- "src/**/*.spec.tsx",- "src/**/*.test.ts",- "src/**/*.test.tsx",- "src/testing/**/*",- "tsup.config.ts",- "tsup.ui.index.tsx",- "vite.config.ts"- ]-}diff --git a/packages/twenty-front/tsconfig.storybook.json b/packages/twenty-front/tsconfig.storybook.jsondeleted file mode 100644index af30860ffd4..00000000000--- a/packages/twenty-front/tsconfig.storybook.json+++ /dev/null@@ -1,14 +0,0 @@-{- "extends": "./tsconfig.json",- "compilerOptions": {- "emitDecoratorMetadata": true- },- "include": [- ".storybook/*.ts",- ".storybook/*.tsx",- "src/**/*.d.ts",- "src/**/*.stories.mdx",- "src/**/*.stories.ts",- "src/**/*.stories.tsx"- ]-}diff --git a/packages/twenty-front/vite.config.ts b/packages/twenty-front/vite.config.tsindex cc787c77c5c..9ffa7b43d5d 100644--- a/packages/twenty-front/vite.config.ts+++ b/packages/twenty-front/vite.config.ts@@ -39,7 +39,7 @@ export default defineConfig(({ command, mode }) => {const tsConfigPath = isBuildCommand? path.resolve(__dirname, './tsconfig.build.json')- : path.resolve(__dirname, './tsconfig.dev.json');+ : path.resolve(__dirname, './tsconfig.json');const CHUNK_SIZE_WARNING_LIMIT = 1024 * 1024; // 1MB// Please don't increase this limit for main index chunkdiff --git a/packages/twenty-sdk/src/cli/__tests__/integration/utils/normalize-manifest.util.ts b/packages/twenty-sdk/src/cli/__tests__/integration/utils/normalize-manifest.util.tsindex e06fe3fccf7..d40e07fe6de 100644--- a/packages/twenty-sdk/src/cli/__tests__/integration/utils/normalize-manifest.util.ts+++ b/packages/twenty-sdk/src/cli/__tests__/integration/utils/normalize-manifest.util.ts@@ -1,9 +1,12 @@-import { type ApplicationManifest } from 'twenty-shared/application';+// Loose type for JSON manifest imports where enum values are inferred as strings+type JsonManifestInput = {+ functions?: Array<{ builtHandlerChecksum?: string | null; [key: string]: unknown }>;+ frontComponents?: Array<{ builtComponentChecksum?: string | null; [key: string]: unknown }>;+ [key: string]: unknown;+};// Replace dynamic checksum values with a placeholder for consistent comparisons-export const normalizeManifestForComparison = <- T extends Partial<ApplicationManifest>,->(+export const normalizeManifestForComparison = <T extends JsonManifestInput>(manifest: T,): T => ({...manifest,diff --git a/packages/twenty-sdk/src/cli/utilities/build/common/esbuild-result-processor.ts b/packages/twenty-sdk/src/cli/utilities/build/common/esbuild-result-processor.tsindex ade5411ce5e..03cf30a2afc 100644--- a/packages/twenty-sdk/src/cli/utilities/build/common/esbuild-result-processor.ts+++ b/packages/twenty-sdk/src/cli/utilities/build/common/esbuild-result-processor.ts@@ -33,7 +33,9 @@ export const processEsbuildResult = async ({for (const outputFile of outputFiles) {const absoluteOutputFile = path.resolve(outputFile);const relativePath = path.relative(outputDir, absoluteOutputFile);- const builtPath = `${builtDir}/${relativePath}`;+ // Normalize path separators to forward slashes for consistent matching+ const normalizedRelativePath = relativePath.split(path.sep).join('/');+ const builtPath = `${builtDir}/${normalizedRelativePath}`;const content = await fs.readFile(absoluteOutputFile);const checksum = crypto.createHash('md5').update(content).digest('hex');diff --git a/packages/twenty-sdk/src/cli/utilities/build/manifest/entities/application.ts b/packages/twenty-sdk/src/cli/utilities/build/manifest/entities/application.tsindex 062d7b844a2..3822b5649dd 100644--- a/packages/twenty-sdk/src/cli/utilities/build/manifest/entities/application.ts+++ b/packages/twenty-sdk/src/cli/utilities/build/manifest/entities/application.ts@@ -1,6 +1,9 @@import { glob } from 'fast-glob';import path from 'path';-import { type Application } from 'twenty-shared/application';+import {+ type Application,+ type ApplicationVariables,+} from 'twenty-shared/application';import { createLogger } from '../../common/logger';import { manifestExtractFromFileServer } from '../manifest-extract-from-file-server';import { type ValidationError } from '../manifest.types';@@ -82,7 +85,7 @@ export class ApplicationEntityBuilderif (application?.applicationVariables) {for (const [name, variable] of Object.entries(application.applicationVariables,- )) {+ ) as [string, ApplicationVariables[string]][]) {if (variable.universalIdentifier) {const locations = seen.get(variable.universalIdentifier) ?? [];locations.push(`application.variables.${name}`);diff --git a/packages/twenty-sdk/tsconfig.json b/packages/twenty-sdk/tsconfig.jsonindex d92d92f0ff6..6e61bc222db 100644--- a/packages/twenty-sdk/tsconfig.json+++ b/packages/twenty-sdk/tsconfig.json@@ -1,4 +1,5 @@{+ "extends": "../../tsconfig.base.json","compilerOptions": {"allowJs": false,"esModuleInterop": false,@@ -9,19 +10,19 @@"noImplicitAny": true,"strictBindCallApply": false,"noEmit": true,+ "types": ["jest", "node"],"paths": {"@/*": ["./src/*"]}},- "files": [],- "include": [],- "references": [- {- "path": "./tsconfig.lib.json"- },- {- "path": "./tsconfig.spec.json"- }- ],- "extends": "../../tsconfig.base.json",+ "include": [+ "src/**/*.ts",+ "src/**/*.tsx",+ "src/**/*.d.ts",+ "**/__mocks__/**/*",+ "**/__tests__/**/*",+ "vite.config.ts",+ "scripts/generateBarrels.ts",+ "jest.config.mjs"+ ]}diff --git a/packages/twenty-sdk/tsconfig.spec.json b/packages/twenty-sdk/tsconfig.spec.jsondeleted file mode 100644index fc1d1923629..00000000000--- a/packages/twenty-sdk/tsconfig.spec.json+++ /dev/null@@ -1,19 +0,0 @@-{- "extends": "./tsconfig.json",- "compilerOptions": {- "types": ["jest", "node"]- },- "include": [- "**/__mocks__/**/*",- "**/__tests__/**/*",- "vite.config.ts",- "scripts/generateBarrels.ts",- "jest.config.mjs",- "src/**/*.d.ts",- "src/**/*.spec.ts",- "src/**/*.spec.tsx",- "src/**/*.test.ts",- "src/**/*.test.tsx",- "src/**/*.e2e-spec.ts"- ]-}diff --git a/packages/twenty-shared/eslint.config.mjs b/packages/twenty-shared/eslint.config.mjsindex 5f553d3aa81..d91100f3a65 100644--- a/packages/twenty-shared/eslint.config.mjs+++ b/packages/twenty-shared/eslint.config.mjs@@ -120,7 +120,7 @@ export default [languageOptions: {parser: typescriptParser,parserOptions: {- project: [path.resolve(__dirname, 'tsconfig.*.json')],+ project: [path.resolve(__dirname, 'tsconfig.json')],},},plugins: {diff --git a/packages/twenty-shared/src/metadata/MetadataValidationError.ts b/packages/twenty-shared/src/metadata/MetadataValidationError.tsindex 2651eb8976c..2cce75aa0a7 100644--- a/packages/twenty-shared/src/metadata/MetadataValidationError.ts+++ b/packages/twenty-shared/src/metadata/MetadataValidationError.ts@@ -1,4 +1,4 @@-import { type AllMetadataName } from '@/metadata/all-metadata-name.type';+import { type AllMetadataName } from './all-metadata-name.type';export type FailedMetadataValidationError = {code: string;diff --git a/packages/twenty-shared/src/translations/constants/AppLocales.ts b/packages/twenty-shared/src/translations/constants/AppLocales.tsindex 972a36e9e06..65a454bb661 100644--- a/packages/twenty-shared/src/translations/constants/AppLocales.ts+++ b/packages/twenty-shared/src/translations/constants/AppLocales.ts@@ -1,7 +1,7 @@import { SOURCE_LOCALE } from '@/translations/constants/SourceLocale';export const APP_LOCALES = {- [SOURCE_LOCALE]: SOURCE_LOCALE,+ en: SOURCE_LOCALE,'pseudo-en': 'pseudo-en','af-ZA': 'af-ZA','ar-SA': 'ar-SA',@@ -33,3 +33,5 @@ export const APP_LOCALES = {'zh-CN': 'zh-CN','zh-TW': 'zh-TW',} as const;++export type AppLocale = keyof typeof APP_LOCALES;diff --git a/packages/twenty-shared/src/translations/index.ts b/packages/twenty-shared/src/translations/index.tsindex 5de276811b6..c444affad1f 100644--- a/packages/twenty-shared/src/translations/index.ts+++ b/packages/twenty-shared/src/translations/index.ts@@ -7,5 +7,6 @@* |___/*/+export type { AppLocale } from './constants/AppLocales';export { APP_LOCALES } from './constants/AppLocales';export { SOURCE_LOCALE } from './constants/SourceLocale';diff --git a/packages/twenty-shared/src/utils/filter/utils/__tests__/isMatchingCurrencyFilter.test.ts b/packages/twenty-shared/src/utils/filter/utils/__tests__/isMatchingCurrencyFilter.test.tsindex 06cd1472ff2..174c151fea1 100644--- a/packages/twenty-shared/src/utils/filter/utils/__tests__/isMatchingCurrencyFilter.test.ts+++ b/packages/twenty-shared/src/utils/filter/utils/__tests__/isMatchingCurrencyFilter.test.ts@@ -306,7 +306,7 @@ describe('isMatchingCurrencyFilter', () => {currencyCode: 'USD',},}),- ).toThrowError('Unexpected filter for currency : {}');+ ).toThrow('Unexpected filter for currency : {}');});});@@ -320,7 +320,7 @@ describe('isMatchingCurrencyFilter', () => {currencyFilter,value: { amountMicros: 10 },}),- ).toThrowError(+ ).toThrow('Unexpected operand for currency amount micros filter : {"unexpected":10}',);});diff --git a/packages/twenty-shared/src/utils/validation/isValidLocale.ts b/packages/twenty-shared/src/utils/validation/isValidLocale.tsindex 8edd2cd5528..813eb7079a8 100644--- a/packages/twenty-shared/src/utils/validation/isValidLocale.ts+++ b/packages/twenty-shared/src/utils/validation/isValidLocale.ts@@ -1,5 +1,4 @@-import { APP_LOCALES } from '@/translations';+import { APP_LOCALES, type AppLocale } from '@/translations/constants/AppLocales';-export const isValidLocale = (- value: string | null,-): value is keyof typeof APP_LOCALES => value !== null && value in APP_LOCALES;+export const isValidLocale = (value: string | null): value is AppLocale =>+ value !== null && value in APP_LOCALES;diff --git a/packages/twenty-shared/src/utils/validation/normalizeLocale.ts b/packages/twenty-shared/src/utils/validation/normalizeLocale.tsindex 3f16ab07337..bd0fc290145 100644--- a/packages/twenty-shared/src/utils/validation/normalizeLocale.ts+++ b/packages/twenty-shared/src/utils/validation/normalizeLocale.ts@@ -1,13 +1,14 @@-import { APP_LOCALES, SOURCE_LOCALE } from '@/translations';--/**- * Maps language codes to full locale keys in APP_LOCALES- * Example: 'fr' -> 'fr-FR', 'en' -> 'en'- */+import {+ APP_LOCALES,+ type AppLocale,+} from '@/translations/constants/AppLocales';+import { SOURCE_LOCALE } from '@/translations/constants/SourceLocale';++// Maps language codes to full locale keys in APP_LOCALES+// Example: 'fr' -> 'fr-FR', 'en' -> 'en'const languageToLocaleMap = Object.keys(APP_LOCALES).reduce<Record<string, string>>((map, locale) => {- // Extract the language code (part before the hyphen or the whole code if no hyphen)const language = locale.split('-')[0].toLowerCase();// Only add to the map if not already added or if the current locale is the source locale@@ -20,19 +21,14 @@ const languageToLocaleMap = Object.keys(APP_LOCALES).reduce<return map;}, {});-/**- * Normalizes a locale string to match our supported formats- */-export const normalizeLocale = (- value: string | null,-): keyof typeof APP_LOCALES => {+export const normalizeLocale = (value: string | null): AppLocale => {if (value === null) {return SOURCE_LOCALE;}// Direct match in our supported localesif (value in APP_LOCALES) {- return value as keyof typeof APP_LOCALES;+ return value as AppLocale;}// Try case-insensitive match (e.g., 'fr-fr' -> 'fr-FR')@@ -40,13 +36,13 @@ export const normalizeLocale = ((locale) => locale.toLowerCase() === value.toLowerCase(),);if (caseInsensitiveMatch) {- return caseInsensitiveMatch as keyof typeof APP_LOCALES;+ return caseInsensitiveMatch as AppLocale;}// Try matching just the language part (e.g., 'fr' -> 'fr-FR')const languageCode = value?.trim() ? value.split('-')[0].toLowerCase() : '';if (languageToLocaleMap[languageCode]) {- return languageToLocaleMap[languageCode] as keyof typeof APP_LOCALES;+ return languageToLocaleMap[languageCode] as AppLocale;}return SOURCE_LOCALE;diff --git a/packages/twenty-shared/tsconfig.json b/packages/twenty-shared/tsconfig.jsonindex b37cc0e8e8c..3eb93b27456 100644--- a/packages/twenty-shared/tsconfig.json+++ b/packages/twenty-shared/tsconfig.json@@ -1,4 +1,5 @@{+ "extends": "../../tsconfig.base.json","compilerOptions": {"allowJs": false,"esModuleInterop": false,@@ -8,19 +9,15 @@"noImplicitAny": true,"strictBindCallApply": false,"noEmit": true,+ "types": ["jest", "node"],"paths": {"@/*": ["./src/*"]}},- "files": [],- "include": [],- "references": [- {- "path": "./tsconfig.lib.json"- },- {- "path": "./tsconfig.spec.json"- }- ],- "extends": "../../tsconfig.base.json"+ "include": [+ "src/**/*.ts",+ "src/**/*.tsx",+ "**/__mocks__/**/*",+ "jest.config.mjs"+ ]}diff --git a/packages/twenty-shared/tsconfig.lib.json b/packages/twenty-shared/tsconfig.lib.jsonindex af976724652..59caaf58a1e 100644--- a/packages/twenty-shared/tsconfig.lib.json+++ b/packages/twenty-shared/tsconfig.lib.json@@ -4,19 +4,15 @@"declaration": true,"declarationMap": true,"noEmit": false,- "baseUrl": ".","outDir": "../../.cache/tsc","types": ["node"]},+ "include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"],"exclude": ["**/*.spec.ts","**/*.test.ts","**/*.spec.tsx","**/*.test.tsx",- "**/*.spec.js",- "**/*.test.js",- "**/*.spec.jsx",- "**/*.test.jsx"- ],- "include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]+ "**/__mocks__/**/*"+ ]}diff --git a/packages/twenty-shared/tsconfig.spec.json b/packages/twenty-shared/tsconfig.spec.jsondeleted file mode 100644index 76fb79b46c6..00000000000--- a/packages/twenty-shared/tsconfig.spec.json+++ /dev/null@@ -1,15 +0,0 @@-{- "extends": "./tsconfig.json",- "compilerOptions": {- "types": ["jest", "node"]- },- "include": [- "**/__mocks__/**/*",- "jest.config.mjs",- "src/**/*.d.ts",- "src/**/*.spec.ts",- "src/**/*.spec.tsx",- "src/**/*.test.ts",- "src/**/*.test.tsx",- ]-}diff --git a/packages/twenty-shared/vite.config.ts b/packages/twenty-shared/vite.config.tsindex 1e7983943fe..bb291102580 100644--- a/packages/twenty-shared/vite.config.ts+++ b/packages/twenty-shared/vite.config.ts@@ -41,6 +41,11 @@ export default defineConfig(() => {return {root: __dirname,cacheDir: '../../node_modules/.vite/packages/twenty-shared',+ resolve: {+ alias: {+ '@/': path.resolve(__dirname, 'src') + '/',+ },+ },plugins: [tsconfigPaths({root: __dirnamediff --git a/packages/twenty-ui/.storybook/main.ts b/packages/twenty-ui/.storybook/main.tsindex 2a004f57a30..4fbcaec0ab3 100644--- a/packages/twenty-ui/.storybook/main.ts+++ b/packages/twenty-ui/.storybook/main.ts@@ -30,7 +30,7 @@ const config: StorybookConfig = {plugins.push(checker({typescript: {- tsconfigPath: path.resolve(dirname, '../tsconfig.dev.json'),+ tsconfigPath: path.resolve(dirname, '../tsconfig.json'),},}),);diff --git a/packages/twenty-ui/eslint.config.mjs b/packages/twenty-ui/eslint.config.mjsindex f925e3e718e..4820d47f2fb 100644--- a/packages/twenty-ui/eslint.config.mjs+++ b/packages/twenty-ui/eslint.config.mjs@@ -23,7 +23,7 @@ export default [languageOptions: {parser: typescriptParser,parserOptions: {- project: [path.resolve(__dirname, 'tsconfig.*.json')],+ project: [path.resolve(__dirname, 'tsconfig.json')],ecmaFeatures: {jsx: true,},diff --git a/packages/twenty-ui/src/input/button/components/ButtonGroup.tsx b/packages/twenty-ui/src/input/button/components/ButtonGroup.tsxindex c3c0bea18d9..922900b2791 100644--- a/packages/twenty-ui/src/input/button/components/ButtonGroup.tsx+++ b/packages/twenty-ui/src/input/button/components/ButtonGroup.tsx@@ -9,9 +9,8 @@ const StyledButtonGroupContainer = styled.div`display: flex;`;-export type ButtonGroupProps = Pick<- ButtonProps,- 'variant' | 'size' | 'accent'+export type ButtonGroupProps = Partial<+ Pick<ButtonProps, 'variant' | 'size' | 'accent'>> & {className?: string;children: ReactNode[];diff --git a/packages/twenty-ui/tsconfig.dev.json b/packages/twenty-ui/tsconfig.dev.jsondeleted file mode 100644index 54a9b125cd9..00000000000--- a/packages/twenty-ui/tsconfig.dev.json+++ /dev/null@@ -1,15 +0,0 @@-{- "extends": "./tsconfig.json",- "include": [- "jest.config.mjs",- "setupTests.ts",- "src/*.d.ts",- "src/**/*.d.ts",- "src/**/*.spec.ts",- "src/**/*.test.ts",- "src/**/*.stories.tsx",- "src/**/*.tsx",- "src/**/*.ts",- "vite.config.ts"- ]-}diff --git a/packages/twenty-ui/tsconfig.json b/packages/twenty-ui/tsconfig.jsonindex 616b6fd3dfa..5073eefc6c4 100644--- a/packages/twenty-ui/tsconfig.json+++ b/packages/twenty-ui/tsconfig.json@@ -9,27 +9,21 @@"moduleResolution": "bundler","esModuleInterop": true,"noEmit": true,- "types": ["node"],+ "types": ["node", "jest"],"outDir": "../../.cache/tsc","paths": {"@ui/*": ["./src/*"],"@assets/*": ["./src/assets/*"]}},- "files": [],- "include": [],- "references": [- {- "path": "./tsconfig.lib.json"- },- {- "path": "./tsconfig.dev.json"- },- {- "path": "./tsconfig.spec.json"- },- {- "path": "./tsconfig.storybook.json"- }+ "include": [+ "src/**/*.ts",+ "src/**/*.tsx",+ "src/**/*.d.ts",+ ".storybook/*.ts",+ ".storybook/*.tsx",+ "jest.config.mjs",+ "setupTests.ts",+ "vite.config.ts"]-}\ No newline at end of file+}diff --git a/packages/twenty-ui/tsconfig.lib.json b/packages/twenty-ui/tsconfig.lib.jsonindex 9b48e2dc2fb..efa65021d1b 100644--- a/packages/twenty-ui/tsconfig.lib.json+++ b/packages/twenty-ui/tsconfig.lib.json@@ -3,9 +3,9 @@"compilerOptions": {"declaration": true,"declarationMap": true,- "baseUrl": ".","noEmit": false},+ "include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.tsx"],"exclude": ["**/*.spec.ts","**/*.spec.tsx",@@ -13,6 +13,5 @@"**/*.stories.tsx","**/*.test.ts","**/*.test.tsx"- ],- "include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.tsx"]+ ]}diff --git a/packages/twenty-ui/tsconfig.spec.json b/packages/twenty-ui/tsconfig.spec.jsondeleted file mode 100644index 08d579b57b4..00000000000--- a/packages/twenty-ui/tsconfig.spec.json+++ /dev/null@@ -1,11 +0,0 @@-{- "extends": "./tsconfig.json",- "include": [- "jest.config.mjs",- "setupTests.ts",- "src/**/*.d.ts",- "src/**/*.spec.ts",- "src/**/*.test.ts",- "vite.config.ts"- ]-}diff --git a/packages/twenty-ui/tsconfig.storybook.json b/packages/twenty-ui/tsconfig.storybook.jsondeleted file mode 100644index 50706725d39..00000000000--- a/packages/twenty-ui/tsconfig.storybook.json+++ /dev/null@@ -1,15 +0,0 @@-{- "extends": "./tsconfig.json",- "compilerOptions": {- "emitDecoratorMetadata": true- },- "include": [- ".storybook/*.ts",- ".storybook/*.tsx",- "src/*.d.ts",- "src/**/*.d.ts",- "src/**/*.stories.mdx",- "src/**/*.stories.ts",- "src/**/*.stories.tsx"- ]-}diff --git a/packages/twenty-ui/vite.config.ts b/packages/twenty-ui/vite.config.tsindex 1f309b71af6..55f68f793d7 100644--- a/packages/twenty-ui/vite.config.ts+++ b/packages/twenty-ui/vite.config.ts@@ -41,7 +41,7 @@ export default defineConfig(({ command }) => {const tsConfigPath = isBuildCommand? path.resolve(__dirname, './tsconfig.lib.json')- : path.resolve(__dirname, './tsconfig.dev.json');+ : path.resolve(__dirname, './tsconfig.json');const checkersConfig: Checkers = {typescript: {@@ -55,6 +55,12 @@ export default defineConfig(({ command }) => {};return {+ resolve: {+ alias: {+ '@ui/': path.resolve(__dirname, 'src') + '/',+ '@assets/': path.resolve(__dirname, 'src/assets') + '/',+ },+ },css: {modules: {localsConvention: 'camelCaseOnly',