-
Notifications
You must be signed in to change notification settings - Fork 2
chore: reorganize tsconfig files for clarity
#257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,7 @@ | ||
| { | ||
| "extends": "../../tsconfig.packages.json", | ||
| "extends": "../../tsconfig.packages.snaps.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "jsx": "react-jsx", | ||
| "jsxImportSource": "@metamask/snaps-sdk", | ||
| "resolveJsonModule": true, | ||
| "exactOptionalPropertyTypes": false, | ||
| "forceConsistentCasingInFileNames": true, | ||
| "noErrorTruncation": true, | ||
| "noUncheckedIndexedAccess": true, | ||
| "skipLibCheck": true, | ||
| "lib": ["ES2023", "DOM"], | ||
| "target": "es2023", | ||
| "module": "preserve", | ||
| "moduleResolution": "bundler", | ||
| "types": ["jest"] | ||
| "baseUrl": "./" | ||
| }, | ||
| "include": [ | ||
| "**/*.ts", | ||
| "**/*.tsx", | ||
| "locales/*.json", | ||
| "snap.manifest.json", | ||
| "src/**/*.json" | ||
| ] | ||
| "include": ["**/*.ts", "**/*.tsx", "**/*.json"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,7 @@ | ||
| { | ||
| "extends": "../../tsconfig.packages.json", | ||
| "extends": "../../tsconfig.packages.snaps.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "jsx": "react-jsx", | ||
| "skipLibCheck": true, | ||
| "jsxImportSource": "@metamask/snaps-sdk", | ||
| "types": ["jest"] | ||
| "baseUrl": "./" | ||
| }, | ||
| "include": ["**/*.ts", "**/*.tsx", "locales/*.json"] | ||
| "include": ["**/*.ts", "**/*.tsx", "**/*.json"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,13 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "extends": "../../tsconfig.packages.non-snaps.build.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "composite": true, | ||
| "declaration": true, | ||
| "declarationMap": true, | ||
| "emitDeclarationOnly": true, | ||
| "inlineSources": true, | ||
| "noEmit": false, | ||
| "sourceMap": true, | ||
| "outDir": "./dist", | ||
| "rootDir": "./src" | ||
| }, | ||
| "references": [], | ||
| "include": ["../../types", "./src"], | ||
| "exclude": ["**/*.test.ts", "**/tests", "**/jest.config.ts"] | ||
| /** | ||
| * Unlike Snap's which include all TypeScript, TSX and JSON files, here we want | ||
| * to mirror what gets built. | ||
| */ | ||
| "include": ["./src"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,11 @@ | ||
| { | ||
| "extends": "../../tsconfig.packages.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "skipLibCheck": true, | ||
| "types": ["jest"] | ||
| "baseUrl": "./" | ||
| }, | ||
| "include": ["../../types", "./src"] | ||
| /** | ||
| * Unlike Snap's which include all TypeScript, TSX and JSON files, here we want | ||
| * to mirror what gets built. | ||
| */ | ||
| "include": ["./src"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,7 @@ | ||
| { | ||
| "extends": "../../tsconfig.packages.json", | ||
| "extends": "../../tsconfig.packages.snaps.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "jsx": "react-jsx", | ||
| "jsxImportSource": "@metamask/snaps-sdk", | ||
| "resolveJsonModule": true, | ||
| "exactOptionalPropertyTypes": false, | ||
| "forceConsistentCasingInFileNames": true, | ||
| "noErrorTruncation": true, | ||
| "noUncheckedIndexedAccess": true, | ||
| "skipLibCheck": true, | ||
| "lib": ["ES2023", "DOM"], | ||
| "target": "es2023", | ||
| "module": "preserve", | ||
| "moduleResolution": "bundler", | ||
| "types": ["jest"] | ||
| "baseUrl": "./" | ||
| }, | ||
| "include": [ | ||
| "**/*.ts", | ||
| "**/*.tsx", | ||
| "locales/*.json", | ||
| "snap.manifest.json", | ||
| "src/**/*.json" | ||
| ] | ||
| "include": ["**/*.ts", "**/*.tsx", "**/*.json"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,7 @@ | ||
| { | ||
| "extends": "../../tsconfig.packages.json", | ||
| "extends": "../../tsconfig.packages.snaps.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "resolveJsonModule": true /* lets us import JSON modules from within TypeScript modules. */, | ||
| "jsx": "react-jsx", | ||
| "jsxImportSource": "@metamask/snaps-sdk", | ||
| "exactOptionalPropertyTypes": false, | ||
| "forceConsistentCasingInFileNames": true, | ||
| "noErrorTruncation": true, | ||
| "noUncheckedIndexedAccess": true, | ||
| "skipLibCheck": true, | ||
| "lib": ["ES2023", "DOM"], | ||
| "target": "es2023", | ||
| "module": "preserve", | ||
| "moduleResolution": "bundler", | ||
| "types": ["jest"] | ||
| "baseUrl": "./" | ||
| }, | ||
| "include": [ | ||
| "**/*.ts", | ||
| "**/*.tsx", | ||
| "locales/*.json", | ||
| "snap.manifest.json", | ||
| "tokenlists/*.json" | ||
| ] | ||
| "include": ["**/*.ts", "**/*.tsx", "**/*.json"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,7 @@ | ||
| { | ||
| "extends": "../../tsconfig.packages.json", | ||
| "extends": "../../tsconfig.packages.snaps.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "resolveJsonModule": true /* lets us import JSON modules from within TypeScript modules. */, | ||
| "jsx": "react-jsx", | ||
| "jsxImportSource": "@metamask/snaps-sdk", | ||
| "exactOptionalPropertyTypes": false, | ||
| "forceConsistentCasingInFileNames": true, | ||
| "noErrorTruncation": true, | ||
| "noUncheckedIndexedAccess": true, | ||
| "skipLibCheck": true, | ||
| "lib": ["ES2023", "DOM"], | ||
| "target": "es2023", | ||
| "module": "preserve", | ||
| "moduleResolution": "bundler", | ||
| "types": ["jest"] | ||
| "baseUrl": "./" | ||
| }, | ||
| "include": [ | ||
| "**/*.ts", | ||
| "**/*.tsx", | ||
| "locales/*.json", | ||
| "messages.json", | ||
| "snap.manifest.json", | ||
| "src/**/*.json" | ||
| ] | ||
| "include": ["**/*.ts", "**/*.tsx", "**/*.json"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,9 @@ | ||
| { | ||
| "extends": "../../tsconfig.packages.build.json", | ||
| "extends": "../../../tsconfig.packages.non-snaps.build.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "outDir": "./dist", | ||
| "rootDir": "./src" | ||
| }, | ||
| "references": [], | ||
| "include": ["../../types", "./src"] | ||
| "include": ["./src"] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,7 @@ | ||
| { | ||
| "extends": "../../tsconfig.packages.json", | ||
| "extends": "../../../tsconfig.packages.json", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also might be too deep here |
||
| "compilerOptions": { | ||
| "baseUrl": "./" | ||
| }, | ||
| "references": [], | ||
| "include": ["../../types", "./src"] | ||
| "include": ["./src"] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| /** | ||
| * Shared settings for non-Snap package build configurations, used by `ts-bridge` to emit | ||
| * declarations. | ||
| * | ||
| * Non-Snap packages extending this configuration must still define their own `outDir`, | ||
| * `rootDir`, and `include`, since these are resolved relative to each package. | ||
| */ | ||
| "extends": "./tsconfig.packages.json", | ||
| "compilerOptions": { | ||
| "composite": true, | ||
| "declaration": true, | ||
| "declarationMap": true, | ||
| "emitDeclarationOnly": true, | ||
| "inlineSources": true, | ||
| "noEmit": false, | ||
| "sourceMap": true | ||
| }, | ||
| "exclude": ["**/*.test.ts", "**/tests", "**/jest.config.ts"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| /** | ||
| * Shared settings for Snap packages, i.e. packages whose bundles are built by `mm-snap` | ||
| * rather than by `tsc` or `ts-bridge`. | ||
| * | ||
| * Snap packages must still set `baseUrl` to their own directory, so that the `paths` option | ||
| * resolves correctly. | ||
| */ | ||
| "extends": "./tsconfig.packages.json", | ||
| "compilerOptions": { | ||
| "exactOptionalPropertyTypes": false, | ||
| "jsx": "react-jsx", | ||
| "jsxImportSource": "@metamask/snaps-sdk", | ||
| "lib": ["ES2023", "DOM"], | ||
| "module": "preserve", | ||
| "moduleResolution": "bundler", | ||
| "resolveJsonModule": true, | ||
| "target": "ES2023" | ||
| } | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 levels isn't it make it outside the repo from this tree level?