cleans up tsconfigs

This commit is contained in:
Steve Ruiz 2021-08-13 13:48:08 +01:00
parent 4a7439ddf8
commit bd938c995b
11 changed files with 63 additions and 113 deletions

View file

@ -21,7 +21,8 @@
"start": "lerna run start --stream --parallel", "start": "lerna run start --stream --parallel",
"start:www": "lerna run start --stream --parallel & cd packages/www && yarn build", "start:www": "lerna run start --stream --parallel & cd packages/www && yarn build",
"build": "yarn build:packages && cd packages/www && yarn build", "build": "yarn build:packages && cd packages/www && yarn build",
"build:packages": "cd packages/core && yarn build && cd ../tldraw && yarn build" "build:packages": "cd packages/core && yarn build && cd ../tldraw && yarn build",
"publish:patch": "yarn build:packages && lerna publish patch"
}, },
"devDependencies": { "devDependencies": {
"@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-import-meta": "^7.10.4",

View file

@ -51,5 +51,6 @@
"ismobilejs": "^1.1.1", "ismobilejs": "^1.1.1",
"react-error-boundary": "^3.1.3", "react-error-boundary": "^3.1.3",
"react-use-gesture": "^9.1.3" "react-use-gesture": "^9.1.3"
} },
"gitHead": "4a7439ddf81b615ee49fddbe00802699975f9375"
} }

View file

@ -1,35 +1,9 @@
{ {
"extends": "../../tsconfig.base.json",
"include": ["src"], "include": ["src"],
"exclude": ["node_modules", "**/*.test.ts", "dist"], "exclude": ["node_modules", "**/*.test.ts", "**/*.spec.ts", "dist"],
"compilerOptions": { "compilerOptions": {
"allowSyntheticDefaultImports": true,
"declaration": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"importsNotUsedAsValues": "error",
"incremental": true,
"importHelpers": true,
"moduleResolution": "node",
"noEmit": false,
"noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */,
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */,
"noUnusedLocals": false /* Report errors on unused locals. */,
"noUnusedParameters": false /* Report errors on unused parameters. */,
"skipLibCheck": true,
"sourceMap": true,
"strict": false,
"strictFunctionTypes": true /* Enable strict checking of function types. */,
"strictNullChecks": true /* Enable strict null checks. */,
"target": "es5",
"typeRoots": ["node_modules/@types", "node_modules/jest"],
"types": ["node", "jest"],
//
"rootDir": "src", "rootDir": "src",
"jsx": "preserve",
"lib": ["dom", "esnext"],
"module": "esnext",
"outDir": "./dist/types", "outDir": "./dist/types",
"baseUrl": "src", "baseUrl": "src",
"paths": { "paths": {

View file

@ -32,5 +32,6 @@
"esbuild": "0.11.5", "esbuild": "0.11.5",
"rimraf": "3.0.2", "rimraf": "3.0.2",
"typescript": "4.2.3" "typescript": "4.2.3"
} },
"gitHead": "4a7439ddf81b615ee49fddbe00802699975f9375"
} }

View file

@ -1,11 +1,10 @@
{ {
"extends": "../../tsconfig.json", "extends": "../../tsconfig.base.json",
"include": ["src"], "include": ["src"],
"exclude": ["node_modules", "**/*.test.ts", "dist"], "exclude": ["node_modules", "**/*.test.ts", "**/*.spec.ts", "dist"],
"compilerOptions": { "compilerOptions": {
"jsx": "preserve", "rootDir": "src",
"lib": ["dom", "esnext"], "outDir": "./dist/types",
"module": "esnext", "baseUrl": "src"
"outDir": "./dist/types"
} }
} }

View file

@ -1,7 +1,7 @@
{ {
"name": "@tldraw/tldraw", "name": "@tldraw/tldraw",
"version": "0.0.42", "version": "0.0.42",
"private": false, "private": true,
"description": "A tiny little drawing app (editor).", "description": "A tiny little drawing app (editor).",
"author": "@steveruizok", "author": "@steveruizok",
"repository": { "repository": {
@ -61,5 +61,6 @@
"perfect-freehand": "^0.4.10", "perfect-freehand": "^0.4.10",
"react-hotkeys-hook": "^3.4.0", "react-hotkeys-hook": "^3.4.0",
"zustand": "^3.5.7" "zustand": "^3.5.7"
} },
"gitHead": "4a7439ddf81b615ee49fddbe00802699975f9375"
} }

View file

@ -1,35 +1,9 @@
{ {
"extends": "../../tsconfig.base.json",
"include": ["src"], "include": ["src"],
"exclude": ["node_modules", "**/*.test.ts", "dist"], "exclude": ["node_modules", "**/*.test.ts", "dist"],
"compilerOptions": { "compilerOptions": {
"allowSyntheticDefaultImports": true,
"declaration": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"importsNotUsedAsValues": "error",
"incremental": true,
"importHelpers": true,
"moduleResolution": "node",
"noEmit": false,
"noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */,
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */,
"noUnusedLocals": false /* Report errors on unused locals. */,
"noUnusedParameters": false /* Report errors on unused parameters. */,
"skipLibCheck": true,
"sourceMap": true,
"strict": false,
"strictFunctionTypes": true /* Enable strict checking of function types. */,
"strictNullChecks": true /* Enable strict null checks. */,
"target": "es5",
"typeRoots": ["node_modules/@types", "node_modules/jest"],
"types": ["node", "jest"],
//
"rootDir": "src", "rootDir": "src",
"jsx": "preserve",
"lib": ["dom", "esnext"],
"module": "esnext",
"outDir": "./dist/types", "outDir": "./dist/types",
"baseUrl": "src", "baseUrl": "src",
"paths": { "paths": {

View file

@ -1,20 +1,14 @@
{ {
"extends": "../../tsconfig.json", "extends": "../../tsconfig.base.json",
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"module": "esnext",
"esModuleInterop": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"] "exclude": ["node_modules", "**/*.test.ts", "**/*.spec.ts", "dist"],
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"rootDir": ".",
"outDir": "./dist/types",
"baseUrl": "src",
"allowJs": true,
"resolveJsonModule": true,
"isolatedModules": true
}
} }

30
tsconfig.base.json Normal file
View file

@ -0,0 +1,30 @@
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"declaration": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"importsNotUsedAsValues": "error",
"incremental": true,
"importHelpers": true,
"moduleResolution": "node",
"noEmit": false,
"noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */,
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */,
"noUnusedLocals": false /* Report errors on unused locals. */,
"noUnusedParameters": false /* Report errors on unused parameters. */,
"skipLibCheck": true,
"sourceMap": true,
"strict": false,
"strictFunctionTypes": true /* Enable strict checking of function types. */,
"strictNullChecks": true /* Enable strict null checks. */,
"target": "es5",
"typeRoots": ["node_modules/@types", "node_modules/jest"],
"types": ["node", "jest"],
"jsx": "preserve",
"lib": ["dom", "esnext"],
"module": "esnext"
}
}

View file

@ -1,33 +1,8 @@
{ {
"extends": "./tsconfig.base.json",
"exclude": ["node_modules", "**/*.test.ts", "**/*.spec.ts"],
"compilerOptions": { "compilerOptions": {
"allowSyntheticDefaultImports": true,
"baseUrl": ".", "baseUrl": ".",
"declaration": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"importsNotUsedAsValues": "error",
"incremental": true,
"importHelpers": true,
"jsx": "react",
"lib": ["dom", "esnext"],
"module": "esnext",
"moduleResolution": "node",
"noEmit": false,
"noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */,
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */,
"noUnusedLocals": false /* Report errors on unused locals. */,
"noUnusedParameters": false /* Report errors on unused parameters. */,
"outDir": "dist",
"skipLibCheck": true,
"sourceMap": true,
"strict": false,
"strictFunctionTypes": true /* Enable strict checking of function types. */,
"strictNullChecks": true /* Enable strict null checks. */,
"target": "es5",
"typeRoots": ["node_modules/@types", "node_modules/jest"],
"types": ["node", "jest"],
"paths": { "paths": {
"@tldraw/tldraw": ["./packages/tldraw/dist"], "@tldraw/tldraw": ["./packages/tldraw/dist"],
"@tldraw/core": ["./packages/core/dist"], "@tldraw/core": ["./packages/core/dist"],