diff --git a/extensions/akismet/.editorconfig b/.editorconfig similarity index 91% rename from extensions/akismet/.editorconfig rename to .editorconfig index a61a3ab36..d240f3e4f 100644 --- a/extensions/akismet/.editorconfig +++ b/.editorconfig @@ -17,3 +17,6 @@ trim_trailing_whitespace = false [*.{php,xml,json}] indent_size = 4 + +[tsconfig.json] +indent_size = 2 diff --git a/extensions/akismet/js/tsconfig.json b/extensions/akismet/js/tsconfig.json index 510f42a00..ecfd75b7c 100644 --- a/extensions/akismet/js/tsconfig.json +++ b/extensions/akismet/js/tsconfig.json @@ -4,14 +4,14 @@ // This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder // and also tells your Typescript server to read core's global typings for // access to `dayjs` and `$` in the global namespace. - "include": ["src/**/*", "../vendor/*/*/js/dist-typings/@types/**/*", "@types/**/*"], + "include": ["src/**/*", "../../../framework/core/js/src/**/*", "../../flags/js/src/@types/**/*", "@types/**/*"], "compilerOptions": { // This will output typings to `dist-typings` "declarationDir": "./dist-typings", "baseUrl": ".", "paths": { - "flarum/*": ["../vendor/flarum/core/js/dist-typings/*"], - "flarum/flags/*": ["../vendor/flarum/flags/js/dist-typings/*"] + "flarum/*": ["../../../framework/core/js/src/*"], + "flarum/flags/*": ["../../flags/js/src/*"] } } } diff --git a/extensions/approval/.editorconfig b/extensions/approval/.editorconfig deleted file mode 100644 index a61a3ab36..000000000 --- a/extensions/approval/.editorconfig +++ /dev/null @@ -1,19 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.{diff,md}] -trim_trailing_whitespace = false - -[*.{php,xml,json}] -indent_size = 4 diff --git a/extensions/bbcode/.editorconfig b/extensions/bbcode/.editorconfig deleted file mode 100644 index a61a3ab36..000000000 --- a/extensions/bbcode/.editorconfig +++ /dev/null @@ -1,19 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.{diff,md}] -trim_trailing_whitespace = false - -[*.{php,xml,json}] -indent_size = 4 diff --git a/extensions/embed/.editorconfig b/extensions/embed/.editorconfig deleted file mode 100644 index a61a3ab36..000000000 --- a/extensions/embed/.editorconfig +++ /dev/null @@ -1,19 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.{diff,md}] -trim_trailing_whitespace = false - -[*.{php,xml,json}] -indent_size = 4 diff --git a/extensions/emoji/.editorconfig b/extensions/emoji/.editorconfig deleted file mode 100644 index a61a3ab36..000000000 --- a/extensions/emoji/.editorconfig +++ /dev/null @@ -1,19 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.{diff,md}] -trim_trailing_whitespace = false - -[*.{php,xml,json}] -indent_size = 4 diff --git a/extensions/flags/.editorconfig b/extensions/flags/.editorconfig deleted file mode 100644 index a61a3ab36..000000000 --- a/extensions/flags/.editorconfig +++ /dev/null @@ -1,19 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.{diff,md}] -trim_trailing_whitespace = false - -[*.{php,xml,json}] -indent_size = 4 diff --git a/extensions/flags/js/tsconfig.json b/extensions/flags/js/tsconfig.json index c24c74031..d0c0d2d85 100644 --- a/extensions/flags/js/tsconfig.json +++ b/extensions/flags/js/tsconfig.json @@ -4,14 +4,14 @@ // This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder // and also tells your Typescript server to read core's global typings for // access to `dayjs` and `$` in the global namespace. - "include": ["src/**/*", "../vendor/*/*/js/dist-typings/@types/**/*", "@types/**/*"], + "include": ["src/**/*", "../../../framework/core/js/src/**/*", "@types/**/*"], "compilerOptions": { // This will output typings to `dist-typings` "declarationDir": "./dist-typings", "baseUrl": ".", "paths": { - "flarum/*": ["../vendor/flarum/core/js/dist-typings/*"], - "@flarum/core/*": ["../vendor/flarum/core/js/dist-typings/*"] + "flarum/*": ["../../../framework/core/js/src/*"], + "@flarum/core/*": ["../../../framework/core/js/src/*"] } } } diff --git a/extensions/lang-english/.editorconfig b/extensions/lang-english/.editorconfig deleted file mode 100644 index a61a3ab36..000000000 --- a/extensions/lang-english/.editorconfig +++ /dev/null @@ -1,19 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.{diff,md}] -trim_trailing_whitespace = false - -[*.{php,xml,json}] -indent_size = 4 diff --git a/extensions/likes/.editorconfig b/extensions/likes/.editorconfig deleted file mode 100644 index a61a3ab36..000000000 --- a/extensions/likes/.editorconfig +++ /dev/null @@ -1,19 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.{diff,md}] -trim_trailing_whitespace = false - -[*.{php,xml,json}] -indent_size = 4 diff --git a/extensions/lock/.editorconfig b/extensions/lock/.editorconfig deleted file mode 100644 index a61a3ab36..000000000 --- a/extensions/lock/.editorconfig +++ /dev/null @@ -1,19 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.{diff,md}] -trim_trailing_whitespace = false - -[*.{php,xml,json}] -indent_size = 4 diff --git a/extensions/markdown/.editorconfig b/extensions/markdown/.editorconfig deleted file mode 100644 index a61a3ab36..000000000 --- a/extensions/markdown/.editorconfig +++ /dev/null @@ -1,19 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.{diff,md}] -trim_trailing_whitespace = false - -[*.{php,xml,json}] -indent_size = 4 diff --git a/extensions/mentions/.editorconfig b/extensions/mentions/.editorconfig deleted file mode 100644 index a61a3ab36..000000000 --- a/extensions/mentions/.editorconfig +++ /dev/null @@ -1,19 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.{diff,md}] -trim_trailing_whitespace = false - -[*.{php,xml,json}] -indent_size = 4 diff --git a/extensions/nicknames/.editorconfig b/extensions/nicknames/.editorconfig deleted file mode 100644 index a61a3ab36..000000000 --- a/extensions/nicknames/.editorconfig +++ /dev/null @@ -1,19 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.{diff,md}] -trim_trailing_whitespace = false - -[*.{php,xml,json}] -indent_size = 4 diff --git a/extensions/package-manager/.editorconfig b/extensions/package-manager/.editorconfig deleted file mode 100755 index a61a3ab36..000000000 --- a/extensions/package-manager/.editorconfig +++ /dev/null @@ -1,19 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.{diff,md}] -trim_trailing_whitespace = false - -[*.{php,xml,json}] -indent_size = 4 diff --git a/extensions/package-manager/js/tsconfig.json b/extensions/package-manager/js/tsconfig.json index ee0d5ef5a..738032bcc 100755 --- a/extensions/package-manager/js/tsconfig.json +++ b/extensions/package-manager/js/tsconfig.json @@ -4,13 +4,13 @@ // This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder // and also tells your Typescript server to read core's global typings for // access to `dayjs` and `$` in the global namespace. - "include": ["src/**/*", "../vendor/flarum/core/js/dist-typings/@types/**/*", "@types/**/*"], + "include": ["src/**/*", "../../../framework/core/js/src/**/*", "@types/**/*"], "compilerOptions": { // This will output typings to `dist-typings` "declarationDir": "./dist-typings", "baseUrl": ".", "paths": { - "flarum/*": ["../vendor/flarum/core/js/dist-typings/*"] + "flarum/*": ["../../../framework/core/js/src/*"] } } } diff --git a/extensions/pusher/.editorconfig b/extensions/pusher/.editorconfig deleted file mode 100644 index a61a3ab36..000000000 --- a/extensions/pusher/.editorconfig +++ /dev/null @@ -1,19 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.{diff,md}] -trim_trailing_whitespace = false - -[*.{php,xml,json}] -indent_size = 4 diff --git a/extensions/pusher/js/tsconfig.json b/extensions/pusher/js/tsconfig.json index 5fe83152f..57adb12f5 100644 --- a/extensions/pusher/js/tsconfig.json +++ b/extensions/pusher/js/tsconfig.json @@ -4,14 +4,14 @@ // This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder // and also tells your Typescript server to read core's global typings for // access to `dayjs` and `$` in the global namespace. - "include": ["src/**/*", "../vendor/*/*/js/dist-typings/@types/**/*", "@types/**/*"], + "include": ["src/**/*", "../../../framework/core/js/src/**/*", "@types/**/*"], "compilerOptions": { // This will output typings to `dist-typings` "declarationDir": "./dist-typings", "baseUrl": ".", "paths": { - "flarum/*": ["../vendor/flarum/core/js/dist-typings/*"], - "flarum/tags/*": ["../vendor/flarum/tags/js/dist-typings/*"] + "flarum/*": ["../../../framework/core/js/src/*"], + "flarum/tags/*": ["../../tags/js/src/*"] } } } diff --git a/extensions/statistics/.editorconfig b/extensions/statistics/.editorconfig deleted file mode 100644 index a61a3ab36..000000000 --- a/extensions/statistics/.editorconfig +++ /dev/null @@ -1,19 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.{diff,md}] -trim_trailing_whitespace = false - -[*.{php,xml,json}] -indent_size = 4 diff --git a/extensions/statistics/js/tsconfig.json b/extensions/statistics/js/tsconfig.json index ee0d5ef5a..738032bcc 100644 --- a/extensions/statistics/js/tsconfig.json +++ b/extensions/statistics/js/tsconfig.json @@ -4,13 +4,13 @@ // This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder // and also tells your Typescript server to read core's global typings for // access to `dayjs` and `$` in the global namespace. - "include": ["src/**/*", "../vendor/flarum/core/js/dist-typings/@types/**/*", "@types/**/*"], + "include": ["src/**/*", "../../../framework/core/js/src/**/*", "@types/**/*"], "compilerOptions": { // This will output typings to `dist-typings` "declarationDir": "./dist-typings", "baseUrl": ".", "paths": { - "flarum/*": ["../vendor/flarum/core/js/dist-typings/*"] + "flarum/*": ["../../../framework/core/js/src/*"] } } } diff --git a/extensions/sticky/.editorconfig b/extensions/sticky/.editorconfig deleted file mode 100644 index a61a3ab36..000000000 --- a/extensions/sticky/.editorconfig +++ /dev/null @@ -1,19 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.{diff,md}] -trim_trailing_whitespace = false - -[*.{php,xml,json}] -indent_size = 4 diff --git a/extensions/subscriptions/.editorconfig b/extensions/subscriptions/.editorconfig deleted file mode 100644 index a61a3ab36..000000000 --- a/extensions/subscriptions/.editorconfig +++ /dev/null @@ -1,19 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.{diff,md}] -trim_trailing_whitespace = false - -[*.{php,xml,json}] -indent_size = 4 diff --git a/extensions/suspend/.editorconfig b/extensions/suspend/.editorconfig deleted file mode 100644 index a61a3ab36..000000000 --- a/extensions/suspend/.editorconfig +++ /dev/null @@ -1,19 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.{diff,md}] -trim_trailing_whitespace = false - -[*.{php,xml,json}] -indent_size = 4 diff --git a/extensions/tags/.editorconfig b/extensions/tags/.editorconfig deleted file mode 100644 index a61a3ab36..000000000 --- a/extensions/tags/.editorconfig +++ /dev/null @@ -1,19 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.{diff,md}] -trim_trailing_whitespace = false - -[*.{php,xml,json}] -indent_size = 4 diff --git a/extensions/tags/js/src/@types/shims.d.ts b/extensions/tags/js/src/@types/shims.d.ts index d6d711e8f..38ea9cdaf 100644 --- a/extensions/tags/js/src/@types/shims.d.ts +++ b/extensions/tags/js/src/@types/shims.d.ts @@ -3,7 +3,7 @@ import type TagListState from '../forum/states/TagListState'; declare module 'flarum/forum/routes' { export interface ForumRoutes { - tag: (tag: Tag) => string; + tag?: (tag: Tag) => string; } } diff --git a/extensions/tags/js/tsconfig.json b/extensions/tags/js/tsconfig.json index 161d73aa0..9a023c394 100644 --- a/extensions/tags/js/tsconfig.json +++ b/extensions/tags/js/tsconfig.json @@ -4,18 +4,18 @@ // This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder // and also tells your Typescript server to read core's global typings for // access to `dayjs` and `$` in the global namespace. - "include": ["src/**/*", "../vendor/flarum/core/js/dist-typings/@types/**/*", "@types/**/*"], + "include": ["src/**/*", "../../../framework/core/js/src/**/*", "@types/**/*"], "compilerOptions": { // This will output typings to `dist-typings` "declarationDir": "./dist-typings", "baseUrl": ".", "paths": { - "flarum/*": ["../vendor/flarum/core/js/dist-typings/*"], + "flarum/*": ["../../../framework/core/js/src/*"], // TODO: remove after export registry system implemented // Without this, the old-style `@flarum/core` import is resolved to // source code in flarum/core instead of the dist typings. // This causes an inaccurate "duplicate export" error. - "@flarum/core/*": ["../vendor/flarum/core/js/dist-typings/*"], + "@flarum/core/*": ["../../../framework/core/js/src/*"], } } } diff --git a/framework/core/.editorconfig b/framework/core/.editorconfig deleted file mode 100644 index a61a3ab36..000000000 --- a/framework/core/.editorconfig +++ /dev/null @@ -1,19 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.{diff,md}] -trim_trailing_whitespace = false - -[*.{php,xml,json}] -indent_size = 4