chore(*): remove unused code (#6781)

The code removed in the PR was flagged as unused by the JetBrains
inspector.

I did a QA on the dev environment but other checks are highly
recommended.

There is one commit by scope to make the review easier.

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Antoine Moreaux
2024-08-29 18:16:50 +02:00
committed by GitHub
parent ebfdc6cfd2
commit cd06ae20e8
86 changed files with 97 additions and 575 deletions

View File

@ -20,7 +20,7 @@ export abstract class AbstractWorkspaceFixer<
> {
private issueTypes: IssueTypes[];
constructor(...issueTypes: IssueTypes[]) {
protected constructor(...issueTypes: IssueTypes[]) {
this.issueTypes = issueTypes;
}

View File

@ -112,13 +112,12 @@ export class WorkspaceDefaultValueFixer extends AbstractWorkspaceFixer<Workspace
for (const issue of issues) {
const currentDefaultValue:
| FieldMetadataDefaultValue<'default'>
| FieldMetadataDefaultValue
// Old format for default values
// TODO: Remove this after all workspaces are migrated
| { type: FieldMetadataDefaultValueFunctionNames }
| null = issue.fieldMetadata.defaultValue;
let alteredDefaultValue: FieldMetadataDefaultValue<'default'> | null =
null;
let alteredDefaultValue: FieldMetadataDefaultValue | null = null;
// Check if it's an old function default value
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
@ -189,7 +188,7 @@ export class WorkspaceDefaultValueFixer extends AbstractWorkspaceFixer<Workspace
private computeFieldMetadataDefaultValueFromColumnDefault(
columnDefault: string | undefined,
): FieldMetadataDefaultValue<'default'> {
): FieldMetadataDefaultValue {
if (
columnDefault === undefined ||
columnDefault === null ||