feat(create-turbo): apply official-starter transform
This commit is contained in:
@@ -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__/"],
|
||||
};
|
||||
@@ -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();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
export const log = (str: any) => {
|
||||
console.log("logger: " + str);
|
||||
};
|
||||
@@ -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"]
|
||||
}
|
||||
Reference in New Issue
Block a user