From ecc2cfbca8a4c61967e217cc47820090e8f97520 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Wed, 30 Apr 2025 09:31:11 +0200 Subject: [PATCH] remove import type for the time beeing --- backend/biome.json | 147 ------------------ backend/src/apis/gms/GmsClient.ts | 2 +- backend/src/apis/humhub/ExportUsers.ts | 4 +- .../apis/humhub/compareHumhubUserDbUser.ts | 4 +- biome.json | 1 + package.json | 3 + yarn.lock | 54 +++++++ 7 files changed, 63 insertions(+), 152 deletions(-) delete mode 100644 backend/biome.json diff --git a/backend/biome.json b/backend/biome.json deleted file mode 100644 index 84d3a3a29..000000000 --- a/backend/biome.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", - "vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false }, - "files": { - "ignoreUnknown": false, - "ignore": ["build", "node_modules", "coverage"], - "include": ["./src/**/*.js", "./src/**/*.ts"] - }, - "formatter": { - "enabled": true, - "useEditorconfig": true, - "formatWithErrors": false, - "indentStyle": "space", - "indentWidth": 2, - "lineEnding": "lf", - "lineWidth": 100, - "attributePosition": "auto", - "bracketSpacing": true - }, - "organizeImports": { "enabled": true }, - "linter": { - "enabled": true, - "rules": { - "recommended": false, - "complexity": { - "noExtraBooleanCast": "error", - "noMultipleSpacesInRegularExpressionLiterals": "error", - "noUselessCatch": "error", - "noUselessConstructor": "error", - "noUselessLoneBlockStatements": "error", - "noUselessRename": "error", - "noUselessTernary": "error", - "noUselessUndefinedInitialization": "error", - "noVoid": "error", - "noWith": "error", - "useLiteralKeys": "error", - "useRegexLiterals": "error" - }, - "correctness": { - "noConstAssign": "error", - "noConstantCondition": "error", - "noEmptyCharacterClassInRegex": "error", - "noEmptyPattern": "error", - "noGlobalObjectCalls": "error", - "noInnerDeclarations": "error", - "noInvalidConstructorSuper": "error", - "noInvalidUseBeforeDeclaration": "error", - "noNewSymbol": "error", - "noNodejsModules": "off", - "noNonoctalDecimalEscape": "error", - "noPrecisionLoss": "error", - "noSelfAssign": "error", - "noSetterReturn": "error", - "noSwitchDeclarations": "error", - "noUndeclaredVariables": "error", - "noUnreachable": "error", - "noUnreachableSuper": "error", - "noUnsafeFinally": "error", - "noUnsafeOptionalChaining": "error", - "noUnusedLabels": "error", - "noUnusedVariables": "error", - "useArrayLiterals": "error", - "useIsNan": "error", - "useValidForDirection": "error", - "useYield": "error" - }, - "security": { "noGlobalEval": "error" }, - "style": { - "noCommaOperator": "error", - "noDefaultExport": "error", - "noVar": "warn", - "noYodaExpression": "error", - "useBlockStatements": "error", - "useConsistentBuiltinInstantiation": "error", - "useConst": "error", - "useSingleVarDeclarator": "error" - }, - "suspicious": { - "noAsyncPromiseExecutor": "error", - "noCatchAssign": "error", - "noClassAssign": "error", - "noCompareNegZero": "error", - "noConsole": "error", - "noControlCharactersInRegex": "error", - "noDebugger": "error", - "noDoubleEquals": "error", - "noDuplicateCase": "error", - "noDuplicateClassMembers": "error", - "noDuplicateObjectKeys": "error", - "noDuplicateParameters": "error", - "noEmptyBlockStatements": "error", - "noFallthroughSwitchClause": "error", - "noFunctionAssign": "error", - "noGlobalAssign": "error", - "noImportAssign": "error", - "noMisleadingCharacterClass": "error", - "noPrototypeBuiltins": "error", - "noRedeclare": "error", - "noSelfCompare": "error", - "noShadowRestrictedNames": "error", - "noSparseArray": "error", - "noUnsafeNegation": "error", - "useDefaultSwitchClauseLast": "error", - "useGetterReturn": "error", - "useValidTypeof": "error" - } - }, - "ignore": ["**/node_modules", "**/*.min.js", "**/build", "**/coverage"] - }, - "javascript": { - "formatter": { - "jsxQuoteStyle": "single", - "quoteProperties": "asNeeded", - "trailingCommas": "all", - "semicolons": "asNeeded", - "arrowParentheses": "always", - "bracketSameLine": false, - "quoteStyle": "single", - "attributePosition": "auto", - "bracketSpacing": true - }, - "globals": [ - "document", - "navigator", - "window", - "describe", - "test", - "it", - "expect", - "beforeAll", - "beforeEach", - "afterAll", - "afterEach", - "jest" - ], - "parser": { - "unsafeParameterDecoratorsEnabled": true - } - }, - "overrides": [ - { - "include": ["*.ts", "*.tsx"], - "linter": { "rules": { "complexity": { "noVoid": "error" } } } - }, - { "include": ["*.test.ts"], "linter": { "rules": {} } } - ] -} diff --git a/backend/src/apis/gms/GmsClient.ts b/backend/src/apis/gms/GmsClient.ts index ce24b95bd..537fe36f2 100644 --- a/backend/src/apis/gms/GmsClient.ts +++ b/backend/src/apis/gms/GmsClient.ts @@ -6,7 +6,7 @@ import { LogError } from '@/server/LogError' import { backendLogger as logger } from '@/server/logger' import { ensureUrlEndsWithSlash } from '@/util/utilities' -import type { GmsUser } from './model/GmsUser' +import { GmsUser } from './model/GmsUser' /* export async function communityList(): Promise { diff --git a/backend/src/apis/humhub/ExportUsers.ts b/backend/src/apis/humhub/ExportUsers.ts index 12208b458..692c90d36 100644 --- a/backend/src/apis/humhub/ExportUsers.ts +++ b/backend/src/apis/humhub/ExportUsers.ts @@ -8,8 +8,8 @@ import { checkDBVersion } from '@/typeorm/DBVersion' import { Connection } from '@/typeorm/connection' import { HumHubClient } from './HumHubClient' -import type { GetUser } from './model/GetUser' -import type { UsersResponse } from './model/UsersResponse' +import { GetUser } from './model/GetUser' +import { UsersResponse } from './model/UsersResponse' import { ExecutedHumhubAction, syncUser } from './syncUser' const USER_BULK_SIZE = 20 diff --git a/backend/src/apis/humhub/compareHumhubUserDbUser.ts b/backend/src/apis/humhub/compareHumhubUserDbUser.ts index 57254e99e..94669b6b4 100644 --- a/backend/src/apis/humhub/compareHumhubUserDbUser.ts +++ b/backend/src/apis/humhub/compareHumhubUserDbUser.ts @@ -1,7 +1,7 @@ -import type { User } from '@entity/User' +import { User } from '@entity/User' import { Account } from './model/Account' -import type { GetUser } from './model/GetUser' +import { GetUser } from './model/GetUser' import { Profile } from './model/Profile' function profileIsTheSame(profile: Profile, user: User): boolean { diff --git a/biome.json b/biome.json index 419076f6c..7549528fb 100644 --- a/biome.json +++ b/biome.json @@ -73,6 +73,7 @@ "useBlockStatements": "error", "useConsistentBuiltinInstantiation": "error", "useConst": "error", + "useImportType": "off", "useSingleVarDeclarator": "error" }, "suspicious": { diff --git a/package.json b/package.json index df99a831a..a8f307a15 100644 --- a/package.json +++ b/package.json @@ -13,5 +13,8 @@ "dependencies": { "auto-changelog": "^2.4.0", "uuid": "^8.3.2" + }, + "devDependencies": { + "@biomejs/biome": "1.9.4" } } diff --git a/yarn.lock b/yarn.lock index 2c8f9b681..358d08f46 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,60 @@ # yarn lockfile v1 +"@biomejs/biome@1.9.4": + version "1.9.4" + resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-1.9.4.tgz#89766281cbc3a0aae865a7ff13d6aaffea2842bf" + integrity sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog== + optionalDependencies: + "@biomejs/cli-darwin-arm64" "1.9.4" + "@biomejs/cli-darwin-x64" "1.9.4" + "@biomejs/cli-linux-arm64" "1.9.4" + "@biomejs/cli-linux-arm64-musl" "1.9.4" + "@biomejs/cli-linux-x64" "1.9.4" + "@biomejs/cli-linux-x64-musl" "1.9.4" + "@biomejs/cli-win32-arm64" "1.9.4" + "@biomejs/cli-win32-x64" "1.9.4" + +"@biomejs/cli-darwin-arm64@1.9.4": + version "1.9.4" + resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.9.4.tgz#dfa376d23a54a2d8f17133c92f23c1bf2e62509f" + integrity sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw== + +"@biomejs/cli-darwin-x64@1.9.4": + version "1.9.4" + resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.9.4.tgz#eafc2ce3849d385fc02238aad1ca4a73395a64d9" + integrity sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg== + +"@biomejs/cli-linux-arm64-musl@1.9.4": + version "1.9.4" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.9.4.tgz#d780c3e01758fc90f3268357e3f19163d1f84fca" + integrity sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA== + +"@biomejs/cli-linux-arm64@1.9.4": + version "1.9.4" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.9.4.tgz#8ed1dd0e89419a4b66a47f95aefb8c46ae6041c9" + integrity sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g== + +"@biomejs/cli-linux-x64-musl@1.9.4": + version "1.9.4" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.9.4.tgz#f36982b966bd671a36671e1de4417963d7db15fb" + integrity sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg== + +"@biomejs/cli-linux-x64@1.9.4": + version "1.9.4" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-1.9.4.tgz#a0a7f56680c76b8034ddc149dbf398bdd3a462e8" + integrity sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg== + +"@biomejs/cli-win32-arm64@1.9.4": + version "1.9.4" + resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.9.4.tgz#e2ef4e0084e76b7e26f0fc887c5ef1265ea56200" + integrity sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg== + +"@biomejs/cli-win32-x64@1.9.4": + version "1.9.4" + resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-1.9.4.tgz#4c7afa90e3970213599b4095e62f87e5972b2340" + integrity sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA== + auto-changelog@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/auto-changelog/-/auto-changelog-2.4.0.tgz#a2d57d49b70ada7ca2e7c6a20a71572561d19cd9"