chore(tooling): add husky and lint-staged

This commit is contained in:
Michael Zetterberg
2024-03-26 13:12:21 +01:00
parent 083c57d0ca
commit e65df3eb97
14 changed files with 828 additions and 206 deletions

View File

@@ -1,11 +1,11 @@
import { Lang } from './lang';
import { Lang } from "./lang"
// This type is only a partial of the data available.
export type ContentstackPluginDefinition = {
type: 'field' | 'rte_plugin';
title: string;
src: string;
};
type: "field" | "rte_plugin"
title: string
src: string
}
// This type is only a partial of the data available.
// Check console when editing an entry for all the data available.
@@ -13,48 +13,48 @@ export type ContentstackPluginDefinition = {
// Extend this if needed.
export type ContentstackEmbeddedData = {
entryMetadata: {
contentTypeUid: string;
entryUid: string;
locale: Lang;
};
contentTypeUid: string
entryUid: string
locale: Lang
}
utilis: {
content_type: {
schema: Array<
| {
uid: string;
data_type: "text";
value: string;
uid: string
data_type: "text"
value: string
}
| {
uid: string;
data_type: "json";
value: unknown;
uid: string
data_type: "json"
value: unknown
}
>;
};
extensions: ContentstackPluginDefinition[];
};
>
}
extensions: ContentstackPluginDefinition[]
}
requestProps: {
stack: {
api_key: string;
};
branch: string;
};
};
api_key: string
}
branch: string
}
}
// This is our version of the required fields we need that are available in ContentstackEmbeddedData
export type ExtractedContentstackEmbeddedData = {
contentType: {
uid: string;
};
uid: string
}
entry: {
locale: Lang;
title: string;
uid: string;
};
plugin: ContentstackPluginDefinition;
locale: Lang
title: string
uid: string
}
plugin: ContentstackPluginDefinition
stack: {
apiKey: string;
};
branch: string;
};
apiKey: string
}
branch: string
}