feat(create-turbo): create kitchen-sink

This commit is contained in:
Turbobot 2025-06-19 02:40:01 +08:00 committed by afiqzudinhadi
commit 4625c93980
80 changed files with 11572 additions and 0 deletions

View file

@ -0,0 +1,4 @@
import { config } from "@repo/eslint-config";
/** @type {import("eslint").Linter.Config} */
export default config;

View file

@ -0,0 +1,45 @@
{
"name": "@repo/logger",
"version": "0.0.0",
"type": "module",
"private": true,
"files": [
"dist"
],
"main": "./dist/es/index.js",
"module": "./dist/es/index.js",
"types": "./dist/es/index.d.ts",
"exports": {
".": {
"import": {
"types": "./dist/es/index.d.ts",
"default": "./dist/es/index.js"
},
"require": {
"types": "./dist/cjs/index.d.cts",
"default": "./dist/cjs/index.cjs"
}
}
},
"scripts": {
"build": "bunchee",
"dev": "bunchee --watch",
"lint": "eslint src/",
"check-types": "tsc --noEmit",
"test": "jest"
},
"jest": {
"preset": "@repo/jest-presets/node"
},
"devDependencies": {
"@jest/globals": "^29.7.0",
"@repo/eslint-config": "workspace:*",
"@repo/jest-presets": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@types/node": "^22.15.3",
"bunchee": "^6.4.0",
"eslint": "^9.29.0",
"jest": "^29.7.0",
"typescript": "5.8.2"
}
}

View file

@ -0,0 +1,12 @@
import { describe, it, expect, jest } from "@jest/globals";
import { log } from "..";
jest.spyOn(global.console, "log");
describe("@repo/logger", () => {
it("prints a message", () => {
log("hello");
// eslint-disable-next-line no-console -- testing console
expect(console.log).toBeCalledWith("LOGGER: ", "hello");
});
});

View file

@ -0,0 +1,4 @@
export const log = (...args: unknown[]): void => {
// eslint-disable-next-line no-console -- logger
console.log("LOGGER: ", ...args);
};

View file

@ -0,0 +1,10 @@
{
"extends": "@repo/typescript-config/base.json",
"compilerOptions": {
"lib": ["ES2015"],
"outDir": "./dist",
"types": ["jest", "node"]
},
"include": ["."],
"exclude": ["node_modules", "dist"],
}

View file

@ -0,0 +1,12 @@
{
"extends": [
"//"
],
"tasks": {
"build": {
"outputs": [
"dist/**"
]
}
}
}