diff --git a/api/jsconfig.json b/api/jsconfig.json index a41e54d10..369b35f51 100644 --- a/api/jsconfig.json +++ b/api/jsconfig.json @@ -1,9 +1,42 @@ { "compilerOptions": { - "baseUrl": ".", + "noEmit": true, + "esModuleInterop": true, + "target": "esnext", + "module": "esnext", + "moduleResolution": "node", + "skipLibCheck": false, + "baseUrl": "./", + "rootDirs": [ + "./src", + "../.redwood/types/mirror/api/src" + ], "paths": { - "src/*": ["./src/*"] - } + "src/*": [ + "./src/*", + "../.redwood/types/mirror/api/src/*" + ], + "types/*": [ + "./types/*", + "../types/*" + ], + "@redwoodjs/testing": [ + "../node_modules/@redwoodjs/testing/api" + ] + }, + "typeRoots": [ + "../node_modules/@types", + "./node_modules/@types" + ], + "types": [ + "jest" + ], + "jsx": "react-jsx" }, - "include": ["src/**/*", "../.redwood/index.d.ts"] + "include": [ + "src", + "../.redwood/types/includes/all-*", + "../.redwood/types/includes/api-*", + "../types" + ] } diff --git a/scripts/jsconfig.json b/scripts/jsconfig.json new file mode 100644 index 000000000..546b32781 --- /dev/null +++ b/scripts/jsconfig.json @@ -0,0 +1,47 @@ +{ + "compilerOptions": { + "noEmit": true, + "esModuleInterop": true, + "target": "esnext", + "module": "esnext", + "moduleResolution": "node", + "baseUrl": "./", + "paths": { + "$api/*": [ + "../api/*" + ], + "api/*": [ + "../api/*" + ], + "$web/*": [ + "../web/*" + ], + "web/*": [ + "../web/*" + ], + "$web/src/*": [ + "../web/src/*", + "../.redwood/types/mirror/web/src/*" + ], + "web/src/*": [ + "../web/src/*", + "../.redwood/types/mirror/web/src/*" + ], + "types/*": [ + "../types/*", + "../web/types/*", + "../api/types/*" + ] + }, + "typeRoots": [ + "../node_modules/@types" + ], + "jsx": "preserve" + }, + "include": [ + ".", + "../.redwood/types/includes/all-*", + "../.redwood/types/includes/web-*", + "../types" + ] +} diff --git a/web/jsconfig.json b/web/jsconfig.json index 20d5a2485..0ee3041e4 100644 --- a/web/jsconfig.json +++ b/web/jsconfig.json @@ -1,10 +1,51 @@ { "compilerOptions": { - "baseUrl": ".", + "noEmit": true, + "esModuleInterop": true, + "target": "esnext", + "module": "esnext", + "moduleResolution": "node", + "baseUrl": "./", + "skipLibCheck": false, + "rootDirs": [ + "./src", + "../.redwood/types/mirror/web/src", + "../api/src", + "../.redwood/types/mirror/api/src" + ], "paths": { - "src/*": ["./src/*"] + "src/*": [ + "./src/*", + "../.redwood/types/mirror/web/src/*", + "../api/src/*", + "../.redwood/types/mirror/api/src/*" + ], + "$api/*": [ + "../api/*" + ], + "types/*": [ + "./types/*", + "../types/*" + ], + "@redwoodjs/testing": [ + "../node_modules/@redwoodjs/testing/web" + ] }, - "jsx": "preserve", + "typeRoots": [ + "../node_modules/@types", + "./node_modules/@types" + ], + "types": [ + "jest", + "@testing-library/jest-dom" + ], + "jsx": "preserve" }, - "include": ["src/**/*"] + "include": [ + "src", + "../.redwood/types/includes/all-*", + "../.redwood/types/includes/web-*", + "../types", + "./types" + ] }