feat: monorepo

This commit is contained in:
Henry
2024-12-12 14:34:10 +00:00
parent b8eed7a90c
commit 0c8d17dce5
370 changed files with 10280 additions and 39805 deletions

48
tooling/prettier/index.js Normal file
View File

@@ -0,0 +1,48 @@
import { fileURLToPath } from "url";
/** @typedef {import("prettier").Config} PrettierConfig */
/** @typedef {import("prettier-plugin-tailwindcss").PluginOptions} TailwindConfig */
/** @typedef {import("@ianvs/prettier-plugin-sort-imports").PluginConfig} SortImportsConfig */
/** @type { PrettierConfig | SortImportsConfig | TailwindConfig } */
const config = {
plugins: [
"@ianvs/prettier-plugin-sort-imports",
"prettier-plugin-tailwindcss",
],
tailwindConfig: fileURLToPath(
new URL("../../tooling/tailwind/web.ts", import.meta.url),
),
tailwindFunctions: ["cn", "cva"],
importOrder: [
"<TYPES>",
"^(next/(.*)$)|^(next$)",
"<THIRD_PARTY_MODULES>",
"",
"<TYPES>^@kan",
"^@kan/(.*)$",
"",
"<TYPES>^[.|..|~]",
"^~/",
"^[../]",
"^[./]",
],
importOrderParserPlugins: ["typescript", "jsx", "decorators-legacy"],
importOrderTypeScriptVersion: "4.4.0",
overrides: [
{
files: "*.json.hbs",
options: {
parser: "json",
},
},
{
files: "*.js.hbs",
options: {
parser: "babel",
},
},
],
};
export default config;

View File

@@ -0,0 +1,24 @@
{
"name": "@kan/prettier-config",
"private": true,
"version": "0.1.0",
"type": "module",
"exports": {
".": "./index.js"
},
"scripts": {
"clean": "git clean -xdf .cache .turbo node_modules",
"format": "prettier --check . --ignore-path ../../.gitignore",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@ianvs/prettier-plugin-sort-imports": "^4.4.0",
"prettier": "catalog:",
"prettier-plugin-tailwindcss": "^0.6.9"
},
"devDependencies": {
"@kan/tsconfig": "workspace:*",
"typescript": "catalog:"
},
"prettier": "@kan/prettier-config"
}

View File

@@ -0,0 +1,5 @@
{
"extends": "@kan/tsconfig/base.json",
"include": ["."],
"exclude": ["node_modules"]
}