From 397a48380e72ccdd0bbf1ac5d6d62cc8bf5032aa Mon Sep 17 00:00:00 2001 From: Saul-Mirone Date: Mon, 30 Dec 2024 16:15:34 +0000 Subject: [PATCH] refactor(editor): simplify tsconfig (#9439) --- blocksuite/affine/all/tsconfig.json | 11 +---------- .../affine/block-attachment/tsconfig.json | 11 +---------- blocksuite/affine/block-bookmark/tsconfig.json | 11 +---------- blocksuite/affine/block-code/tsconfig.json | 11 +---------- blocksuite/affine/block-database/tsconfig.json | 11 +---------- blocksuite/affine/block-divider/tsconfig.json | 11 +---------- .../affine/block-edgeless-text/tsconfig.json | 11 +---------- blocksuite/affine/block-embed/tsconfig.json | 11 +---------- blocksuite/affine/block-frame/tsconfig.json | 11 +---------- blocksuite/affine/block-image/tsconfig.json | 11 +---------- blocksuite/affine/block-latex/tsconfig.json | 11 +---------- blocksuite/affine/block-list/tsconfig.json | 11 +---------- blocksuite/affine/block-note/tsconfig.json | 11 +---------- .../affine/block-paragraph/tsconfig.json | 11 +---------- .../affine/block-surface-ref/tsconfig.json | 11 +---------- blocksuite/affine/block-surface/tsconfig.json | 11 +---------- blocksuite/affine/components/tsconfig.json | 11 +---------- blocksuite/affine/data-view/tsconfig.json | 8 +------- blocksuite/affine/model/tsconfig.json | 11 +---------- blocksuite/affine/shared/tsconfig.json | 11 +---------- .../affine/widget-drag-handle/tsconfig.json | 11 +---------- .../widget-remote-selection/tsconfig.json | 5 +---- .../widget-scroll-anchoring/tsconfig.json | 5 +---- blocksuite/blocks/tsconfig.json | 11 +---------- blocksuite/framework/tsconfig.json | 18 ++++++++++++++++++ blocksuite/presets/tsconfig.json | 8 +------- 26 files changed, 43 insertions(+), 232 deletions(-) create mode 100644 blocksuite/framework/tsconfig.json diff --git a/blocksuite/affine/all/tsconfig.json b/blocksuite/affine/all/tsconfig.json index c5e070d612..7b7b05aec4 100644 --- a/blocksuite/affine/all/tsconfig.json +++ b/blocksuite/affine/all/tsconfig.json @@ -8,16 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../../framework/global" - }, - { - "path": "../../framework/store" - }, - { - "path": "../../framework/block-std" - }, - { - "path": "../../framework/inline" + "path": "../../framework" }, { "path": "../../blocks" diff --git a/blocksuite/affine/block-attachment/tsconfig.json b/blocksuite/affine/block-attachment/tsconfig.json index 622857f8c4..e6302efe20 100644 --- a/blocksuite/affine/block-attachment/tsconfig.json +++ b/blocksuite/affine/block-attachment/tsconfig.json @@ -8,16 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../../framework/global" - }, - { - "path": "../../framework/store" - }, - { - "path": "../../framework/block-std" - }, - { - "path": "../../framework/inline" + "path": "../../framework" }, { "path": "../model" diff --git a/blocksuite/affine/block-bookmark/tsconfig.json b/blocksuite/affine/block-bookmark/tsconfig.json index 54b5d3348b..19089f9715 100644 --- a/blocksuite/affine/block-bookmark/tsconfig.json +++ b/blocksuite/affine/block-bookmark/tsconfig.json @@ -8,16 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../../framework/global" - }, - { - "path": "../../framework/store" - }, - { - "path": "../../framework/block-std" - }, - { - "path": "../../framework/inline" + "path": "../../framework" }, { "path": "../model" diff --git a/blocksuite/affine/block-code/tsconfig.json b/blocksuite/affine/block-code/tsconfig.json index c1a5453aa5..e91b896c92 100644 --- a/blocksuite/affine/block-code/tsconfig.json +++ b/blocksuite/affine/block-code/tsconfig.json @@ -8,16 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../../framework/global" - }, - { - "path": "../../framework/store" - }, - { - "path": "../../framework/block-std" - }, - { - "path": "../../framework/inline" + "path": "../../framework" }, { "path": "../model" diff --git a/blocksuite/affine/block-database/tsconfig.json b/blocksuite/affine/block-database/tsconfig.json index 419ea8f164..38a17899d3 100644 --- a/blocksuite/affine/block-database/tsconfig.json +++ b/blocksuite/affine/block-database/tsconfig.json @@ -8,16 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../../framework/global" - }, - { - "path": "../../framework/store" - }, - { - "path": "../../framework/block-std" - }, - { - "path": "../../framework/inline" + "path": "../../framework" }, { "path": "../model" diff --git a/blocksuite/affine/block-divider/tsconfig.json b/blocksuite/affine/block-divider/tsconfig.json index c1a5453aa5..e91b896c92 100644 --- a/blocksuite/affine/block-divider/tsconfig.json +++ b/blocksuite/affine/block-divider/tsconfig.json @@ -8,16 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../../framework/global" - }, - { - "path": "../../framework/store" - }, - { - "path": "../../framework/block-std" - }, - { - "path": "../../framework/inline" + "path": "../../framework" }, { "path": "../model" diff --git a/blocksuite/affine/block-edgeless-text/tsconfig.json b/blocksuite/affine/block-edgeless-text/tsconfig.json index f86f39bde9..8d845ec2f7 100644 --- a/blocksuite/affine/block-edgeless-text/tsconfig.json +++ b/blocksuite/affine/block-edgeless-text/tsconfig.json @@ -8,16 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../../framework/global" - }, - { - "path": "../../framework/store" - }, - { - "path": "../../framework/block-std" - }, - { - "path": "../../framework/inline" + "path": "../../framework" }, { "path": "../model" diff --git a/blocksuite/affine/block-embed/tsconfig.json b/blocksuite/affine/block-embed/tsconfig.json index f86f39bde9..8d845ec2f7 100644 --- a/blocksuite/affine/block-embed/tsconfig.json +++ b/blocksuite/affine/block-embed/tsconfig.json @@ -8,16 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../../framework/global" - }, - { - "path": "../../framework/store" - }, - { - "path": "../../framework/block-std" - }, - { - "path": "../../framework/inline" + "path": "../../framework" }, { "path": "../model" diff --git a/blocksuite/affine/block-frame/tsconfig.json b/blocksuite/affine/block-frame/tsconfig.json index c1a5453aa5..e91b896c92 100644 --- a/blocksuite/affine/block-frame/tsconfig.json +++ b/blocksuite/affine/block-frame/tsconfig.json @@ -8,16 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../../framework/global" - }, - { - "path": "../../framework/store" - }, - { - "path": "../../framework/block-std" - }, - { - "path": "../../framework/inline" + "path": "../../framework" }, { "path": "../model" diff --git a/blocksuite/affine/block-image/tsconfig.json b/blocksuite/affine/block-image/tsconfig.json index c1a5453aa5..e91b896c92 100644 --- a/blocksuite/affine/block-image/tsconfig.json +++ b/blocksuite/affine/block-image/tsconfig.json @@ -8,16 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../../framework/global" - }, - { - "path": "../../framework/store" - }, - { - "path": "../../framework/block-std" - }, - { - "path": "../../framework/inline" + "path": "../../framework" }, { "path": "../model" diff --git a/blocksuite/affine/block-latex/tsconfig.json b/blocksuite/affine/block-latex/tsconfig.json index fd1a7c5d9c..c3a5e9a724 100644 --- a/blocksuite/affine/block-latex/tsconfig.json +++ b/blocksuite/affine/block-latex/tsconfig.json @@ -8,16 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../../framework/global" - }, - { - "path": "../../framework/store" - }, - { - "path": "../../framework/block-std" - }, - { - "path": "../../framework/inline" + "path": "../../framework" }, { "path": "../model" diff --git a/blocksuite/affine/block-list/tsconfig.json b/blocksuite/affine/block-list/tsconfig.json index c1a5453aa5..e91b896c92 100644 --- a/blocksuite/affine/block-list/tsconfig.json +++ b/blocksuite/affine/block-list/tsconfig.json @@ -8,16 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../../framework/global" - }, - { - "path": "../../framework/store" - }, - { - "path": "../../framework/block-std" - }, - { - "path": "../../framework/inline" + "path": "../../framework" }, { "path": "../model" diff --git a/blocksuite/affine/block-note/tsconfig.json b/blocksuite/affine/block-note/tsconfig.json index 622857f8c4..e6302efe20 100644 --- a/blocksuite/affine/block-note/tsconfig.json +++ b/blocksuite/affine/block-note/tsconfig.json @@ -8,16 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../../framework/global" - }, - { - "path": "../../framework/store" - }, - { - "path": "../../framework/block-std" - }, - { - "path": "../../framework/inline" + "path": "../../framework" }, { "path": "../model" diff --git a/blocksuite/affine/block-paragraph/tsconfig.json b/blocksuite/affine/block-paragraph/tsconfig.json index c1a5453aa5..e91b896c92 100644 --- a/blocksuite/affine/block-paragraph/tsconfig.json +++ b/blocksuite/affine/block-paragraph/tsconfig.json @@ -8,16 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../../framework/global" - }, - { - "path": "../../framework/store" - }, - { - "path": "../../framework/block-std" - }, - { - "path": "../../framework/inline" + "path": "../../framework" }, { "path": "../model" diff --git a/blocksuite/affine/block-surface-ref/tsconfig.json b/blocksuite/affine/block-surface-ref/tsconfig.json index c1a5453aa5..e91b896c92 100644 --- a/blocksuite/affine/block-surface-ref/tsconfig.json +++ b/blocksuite/affine/block-surface-ref/tsconfig.json @@ -8,16 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../../framework/global" - }, - { - "path": "../../framework/store" - }, - { - "path": "../../framework/block-std" - }, - { - "path": "../../framework/inline" + "path": "../../framework" }, { "path": "../model" diff --git a/blocksuite/affine/block-surface/tsconfig.json b/blocksuite/affine/block-surface/tsconfig.json index c1a5453aa5..e91b896c92 100644 --- a/blocksuite/affine/block-surface/tsconfig.json +++ b/blocksuite/affine/block-surface/tsconfig.json @@ -8,16 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../../framework/global" - }, - { - "path": "../../framework/store" - }, - { - "path": "../../framework/block-std" - }, - { - "path": "../../framework/inline" + "path": "../../framework" }, { "path": "../model" diff --git a/blocksuite/affine/components/tsconfig.json b/blocksuite/affine/components/tsconfig.json index 9a95b45230..2fc3c51a7e 100644 --- a/blocksuite/affine/components/tsconfig.json +++ b/blocksuite/affine/components/tsconfig.json @@ -8,16 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../../framework/global" - }, - { - "path": "../../framework/store" - }, - { - "path": "../../framework/block-std" - }, - { - "path": "../../framework/inline" + "path": "../../framework" }, { "path": "../shared" diff --git a/blocksuite/affine/data-view/tsconfig.json b/blocksuite/affine/data-view/tsconfig.json index d290cc2806..0bbb2ef3fc 100644 --- a/blocksuite/affine/data-view/tsconfig.json +++ b/blocksuite/affine/data-view/tsconfig.json @@ -15,13 +15,7 @@ "path": "../shared" }, { - "path": "../../framework/block-std" - }, - { - "path": "../../framework/global" - }, - { - "path": "../../framework/store" + "path": "../../framework" } ] } diff --git a/blocksuite/affine/model/tsconfig.json b/blocksuite/affine/model/tsconfig.json index e2574d0ea5..6dc12160be 100644 --- a/blocksuite/affine/model/tsconfig.json +++ b/blocksuite/affine/model/tsconfig.json @@ -8,16 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../../framework/global" - }, - { - "path": "../../framework/store" - }, - { - "path": "../../framework/block-std" - }, - { - "path": "../../framework/inline" + "path": "../../framework" } ] } diff --git a/blocksuite/affine/shared/tsconfig.json b/blocksuite/affine/shared/tsconfig.json index 040a14cb04..2be2813029 100644 --- a/blocksuite/affine/shared/tsconfig.json +++ b/blocksuite/affine/shared/tsconfig.json @@ -8,16 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../../framework/global" - }, - { - "path": "../../framework/store" - }, - { - "path": "../../framework/block-std" - }, - { - "path": "../../framework/inline" + "path": "../../framework" }, { "path": "../model" diff --git a/blocksuite/affine/widget-drag-handle/tsconfig.json b/blocksuite/affine/widget-drag-handle/tsconfig.json index f1815719da..b2be9ad6b4 100644 --- a/blocksuite/affine/widget-drag-handle/tsconfig.json +++ b/blocksuite/affine/widget-drag-handle/tsconfig.json @@ -8,16 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../../framework/global" - }, - { - "path": "../../framework/store" - }, - { - "path": "../../framework/block-std" - }, - { - "path": "../../framework/inline" + "path": "../../framework" }, { "path": "../model" diff --git a/blocksuite/affine/widget-remote-selection/tsconfig.json b/blocksuite/affine/widget-remote-selection/tsconfig.json index 45167e0485..515e24c087 100644 --- a/blocksuite/affine/widget-remote-selection/tsconfig.json +++ b/blocksuite/affine/widget-remote-selection/tsconfig.json @@ -8,10 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../../framework/global" - }, - { - "path": "../../framework/block-std" + "path": "../../framework" }, { "path": "../model" diff --git a/blocksuite/affine/widget-scroll-anchoring/tsconfig.json b/blocksuite/affine/widget-scroll-anchoring/tsconfig.json index 45167e0485..515e24c087 100644 --- a/blocksuite/affine/widget-scroll-anchoring/tsconfig.json +++ b/blocksuite/affine/widget-scroll-anchoring/tsconfig.json @@ -8,10 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../../framework/global" - }, - { - "path": "../../framework/block-std" + "path": "../../framework" }, { "path": "../model" diff --git a/blocksuite/blocks/tsconfig.json b/blocksuite/blocks/tsconfig.json index 6ff641439d..bc8efc3913 100644 --- a/blocksuite/blocks/tsconfig.json +++ b/blocksuite/blocks/tsconfig.json @@ -8,16 +8,7 @@ "include": ["./src"], "references": [ { - "path": "../framework/global" - }, - { - "path": "../framework/store" - }, - { - "path": "../framework/block-std" - }, - { - "path": "../framework/inline" + "path": "../framework" }, { "path": "../affine/model" diff --git a/blocksuite/framework/tsconfig.json b/blocksuite/framework/tsconfig.json new file mode 100644 index 0000000000..dae3abee89 --- /dev/null +++ b/blocksuite/framework/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../tsconfig.json", + "include": [], + "references": [ + { + "path": "./global" + }, + { + "path": "./inline" + }, + { + "path": "./block-std" + }, + { + "path": "./store" + } + ] +} diff --git a/blocksuite/presets/tsconfig.json b/blocksuite/presets/tsconfig.json index 0ddbcd9d24..dc021d6b61 100644 --- a/blocksuite/presets/tsconfig.json +++ b/blocksuite/presets/tsconfig.json @@ -10,13 +10,7 @@ "include": ["./src", "./src/**/*.json"], "references": [ { - "path": "../framework/global" - }, - { - "path": "../framework/store" - }, - { - "path": "../framework/block-std" + "path": "../framework" }, { "path": "../blocks"