feat(create-turbo): apply official-starter transform

This commit is contained in:
Turbobot
2025-02-08 13:41:40 -08:00
committed by ryan
parent 9fe2818df8
commit c158dda08f
48 changed files with 5621 additions and 24 deletions
+10
View File
@@ -0,0 +1,10 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: ["@repo/eslint-config/react-internal.js"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: true,
},
ignorePatterns: ["**/__tests__/"],
};
+30
View File
@@ -0,0 +1,30 @@
{
"name": "@repo/logger",
"version": "0.0.0",
"private": true,
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist/**"
],
"scripts": {
"build": "tsc",
"clean": "rm -rf dist",
"dev": "tsc -w",
"lint": "eslint \"src/**/*.ts*\" --max-warnings 0",
"test": "jest"
},
"jest": {
"preset": "@repo/jest-presets/node"
},
"devDependencies": {
"@jest/globals": "^29.7.0",
"@repo/eslint-config": "*",
"@repo/jest-presets": "*",
"@repo/typescript-config": "*",
"@types/node": "^20.11.24",
"eslint": "^8.57.0",
"jest": "^29.7.0",
"typescript": "5.5.4"
}
}
@@ -0,0 +1,11 @@
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");
expect(console.log).toHaveBeenCalled();
});
});
+3
View File
@@ -0,0 +1,3 @@
export const log = (str: any) => {
console.log("logger: " + str);
};
+11
View File
@@ -0,0 +1,11 @@
{
"extends": "@repo/typescript-config/base.json",
"compilerOptions": {
"lib": ["ES2015", "DOM"],
"outDir": "./dist",
"rootDir": "./src",
"types": ["jest", "node"]
},
"include": ["src"],
"exclude": ["node_modules"]
}