Skip to content

Commit

Permalink
streamline tsconfigs for all backend projects
Browse files Browse the repository at this point in the history
  • Loading branch information
netroy committed May 17, 2024
1 parent 3a54128 commit ef7fdb4
Show file tree
Hide file tree
Showing 22 changed files with 25 additions and 43 deletions.
2 changes: 1 addition & 1 deletion packages/@n8n/client-oauth2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"scripts": {
"clean": "rimraf dist .turbo",
"dev": "pnpm watch",
"typecheck": "tsc",
"typecheck": "tsc --noEmit",
"build": "tsc -p tsconfig.build.json",
"format": "prettier --write . --ignore-path ../../../.prettierignore",
"lint": "eslint . --quiet",
Expand Down
1 change: 1 addition & 0 deletions packages/@n8n/client-oauth2/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"compilerOptions": {
"composite": true,
"rootDir": "src",
"outDir": "dist",
"tsBuildInfoFile": "dist/build.tsbuildinfo"
Expand Down
2 changes: 0 additions & 2 deletions packages/@n8n/client-oauth2/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
"compilerOptions": {
"rootDir": ".",
"types": ["node", "jest"],
"composite": true,
"noEmit": true,
"baseUrl": "src",
"paths": {
"@/*": ["./*"]
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/imap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"scripts": {
"clean": "rimraf dist .turbo",
"dev": "pnpm watch",
"typecheck": "tsc",
"typecheck": "tsc --noEmit",
"build": "tsc -p tsconfig.build.json",
"format": "prettier --write . --ignore-path ../../../.prettierignore",
"lint": "eslint . --quiet",
Expand Down
1 change: 1 addition & 0 deletions packages/@n8n/imap/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"compilerOptions": {
"composite": true,
"rootDir": "src",
"outDir": "dist",
"tsBuildInfoFile": "dist/build.tsbuildinfo"
Expand Down
2 changes: 0 additions & 2 deletions packages/@n8n/imap/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
"compilerOptions": {
"rootDir": ".",
"types": ["node", "jest"],
"composite": true,
"noEmit": true,
"baseUrl": "src",
"tsBuildInfoFile": "dist/typecheck.tsbuildinfo"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/nodes-langchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"scripts": {
"clean": "rimraf dist .turbo",
"dev": "pnpm run watch",
"typecheck": "tsc",
"typecheck": "tsc --noEmit",
"build": "tsc -p tsconfig.build.json && pnpm n8n-copy-icons && pnpm build:metadata",
"build:metadata": "pnpm n8n-generate-known && pnpm n8n-generate-ui-types",
"format": "prettier nodes credentials --write",
Expand Down
5 changes: 1 addition & 4 deletions packages/@n8n/nodes-langchain/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"extends": ["./tsconfig.json"],
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"compilerOptions": {
"types": ["node"],
"noEmit": false,
"declaration": true,
"outDir": "dist",
"tsBuildInfoFile": "dist/build.tsbuildinfo"
},
Expand Down
30 changes: 10 additions & 20 deletions packages/@n8n/nodes-langchain/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
{
"extends": ["../../../tsconfig.json", "../../../tsconfig.backend.json"],
"compilerOptions": {
"strict": true,
"module": "commonjs",
"moduleResolution": "node",
"target": "es2019",
"lib": ["es2019", "es2020", "es2022.error"],
"removeComments": true,
"useUnknownInCatchVariables": false,
"forceConsistentCasingInFileNames": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"strictNullChecks": true,
"preserveConstEnums": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"incremental": true,
"declaration": true,
"sourceMap": true,
"skipLibCheck": true,
"outDir": "./dist/"
"lib": ["es2020", "es2022.error"],
"tsBuildInfoFile": "dist/typecheck.tsbuildinfo",
// TODO: remove all options below this line
"useUnknownInCatchVariables": false
},
"include": ["credentials/**/*", "nodes/**/*", "utils/**/*.ts", "nodes/**/*.json"]
"include": ["credentials/**/*", "nodes/**/*", "utils/**/*.ts", "nodes/**/*.json"],
"references": [
{ "path": "../../workflow/tsconfig.build.json" },
{ "path": "../../core/tsconfig.build.json" }
]
}
2 changes: 1 addition & 1 deletion packages/@n8n/permissions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"scripts": {
"clean": "rimraf dist .turbo",
"dev": "pnpm watch",
"typecheck": "tsc",
"typecheck": "tsc --noEmit",
"build": "tsc -p tsconfig.build.json",
"format": "prettier --write . --ignore-path ../../../.prettierignore",
"lint": "eslint . --quiet",
Expand Down
1 change: 1 addition & 0 deletions packages/@n8n/permissions/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"compilerOptions": {
"composite": true,
"rootDir": "src",
"outDir": "dist",
"tsBuildInfoFile": "dist/build.tsbuildinfo"
Expand Down
2 changes: 0 additions & 2 deletions packages/@n8n/permissions/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
"compilerOptions": {
"rootDir": ".",
"types": ["node", "jest"],
"composite": true,
"noEmit": true,
"baseUrl": "src",
"paths": {
"@/*": ["./*"]
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"scripts": {
"clean": "rimraf dist .turbo",
"typecheck": "tsc",
"typecheck": "tsc --noEmit",
"build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && node scripts/build.mjs",
"buildAndDev": "pnpm run build && pnpm run dev",
"dev": "concurrently -k -n \"TypeScript,Node\" -c \"yellow.bold,cyan.bold\" \"npm run watch\" \"nodemon\"",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"scripts": {
"clean": "rimraf dist .turbo",
"typecheck": "tsc",
"typecheck": "tsc --noEmit",
"build": "tsc -p tsconfig.build.json",
"dev": "pnpm watch",
"format": "prettier --write . --ignore-path ../../.prettierignore",
Expand Down
1 change: 1 addition & 0 deletions packages/core/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": ["./tsconfig.json", "../../tsconfig.build.json"],
"compilerOptions": {
"composite": true,
"rootDir": "src",
"outDir": "dist",
"tsBuildInfoFile": "dist/build.tsbuildinfo"
Expand Down
1 change: 0 additions & 1 deletion packages/core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": ["../../tsconfig.json", "../../tsconfig.backend.json"],
"compilerOptions": {
"rootDir": ".",
"composite": true,
"baseUrl": "src",
"paths": {
"@/*": ["./*"]
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"scripts": {
"clean": "rimraf dist .turbo",
"dev": "pnpm watch",
"typecheck": "tsc",
"typecheck": "tsc --noEmit",
"build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && pnpm n8n-copy-icons && pnpm n8n-generate-translations && pnpm build:metadata",
"build:metadata": "pnpm n8n-generate-known && pnpm n8n-generate-ui-types",
"format": "prettier --write . --ignore-path ../../.prettierignore",
Expand Down
2 changes: 1 addition & 1 deletion packages/workflow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"scripts": {
"clean": "rimraf dist .turbo",
"dev": "pnpm watch",
"typecheck": "tsc",
"typecheck": "tsc --noEmit",
"build": "tsc -p tsconfig.build.json",
"format": "prettier --write . --ignore-path ../../.prettierignore",
"lint": "eslint . --quiet",
Expand Down
1 change: 1 addition & 0 deletions packages/workflow/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": ["./tsconfig.json", "../../tsconfig.build.json"],
"compilerOptions": {
"composite": true,
"rootDir": "src",
"outDir": "dist",
"tsBuildInfoFile": "dist/build.tsbuildinfo"
Expand Down
1 change: 0 additions & 1 deletion packages/workflow/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": ".",
"composite": true,
"baseUrl": "src",
"paths": {
"@/*": ["./*"]
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.backend.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"compilerOptions": {
"types": ["node", "jest"],
"noEmit": true
"types": ["node", "jest"]
}
}
1 change: 0 additions & 1 deletion tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"compilerOptions": {
"types": ["node"],
"noEmit": false,
"noUnusedLocals": false,
"noUnusedParameters": false,
"declaration": true
Expand Down

0 comments on commit ef7fdb4

Please sign in to comment.