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 c5e070d61..7b7b05aec 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 622857f8c..e6302efe2 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 54b5d3348..19089f971 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 c1a5453aa..e91b896c9 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 419ea8f16..38a17899d 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 c1a5453aa..e91b896c9 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 f86f39bde..8d845ec2f 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 f86f39bde..8d845ec2f 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 c1a5453aa..e91b896c9 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 c1a5453aa..e91b896c9 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 fd1a7c5d9..c3a5e9a72 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 c1a5453aa..e91b896c9 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 622857f8c..e6302efe2 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 c1a5453aa..e91b896c9 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 c1a5453aa..e91b896c9 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 c1a5453aa..e91b896c9 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 9a95b4523..2fc3c51a7 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 d290cc280..0bbb2ef3f 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 e2574d0ea..6dc12160b 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 040a14cb0..2be281302 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 f1815719d..b2be9ad6b 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 45167e048..515e24c08 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 45167e048..515e24c08 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 6ff641439..bc8efc391 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 000000000..dae3abee8 --- /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 0ddbcd9d2..dc021d6b6 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"