mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-21 14:55:43 +00:00
refactor(hooks): move cross-cutting hooks into lib/hooks
The five residual src/hooks/ hooks (useConnectionStatus, useCardGridMetrics, useTracklistColumns, useNavidromeAdminRole, useAnalysisPerfListener) are all domain-agnostic — none imports @/features — so they join the other shared hooks in src/lib/hooks/ (with their two colocated tests). Consumers repointed; relative-up imports in the moved files become the @/ alias. src/hooks/ is removed. Pure move + import updates, no behavior change. The layering baseline gains five lib->store entries (the three hooks that read authStore/devOfflineBrowseStore are only now caught under lib/) — same documented debt class as the api move.
This commit is contained in:
@@ -533,6 +533,91 @@
|
||||
"name": "lib-is-the-floor"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "dependency",
|
||||
"from": "src/lib/hooks/useCardGridMetrics.ts",
|
||||
"to": "src/store/authStore.ts",
|
||||
"unresolvedTo": "@/store/authStore",
|
||||
"dependencyTypes": [
|
||||
"aliased",
|
||||
"aliased-tsconfig",
|
||||
"aliased-tsconfig-paths",
|
||||
"local",
|
||||
"import"
|
||||
],
|
||||
"rule": {
|
||||
"severity": "error",
|
||||
"name": "lib-is-the-floor"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "dependency",
|
||||
"from": "src/lib/hooks/useCardGridMetrics.ts",
|
||||
"to": "src/store/authStoreHelpers.ts",
|
||||
"unresolvedTo": "@/store/authStoreHelpers",
|
||||
"dependencyTypes": [
|
||||
"aliased",
|
||||
"aliased-tsconfig",
|
||||
"aliased-tsconfig-paths",
|
||||
"local",
|
||||
"import"
|
||||
],
|
||||
"rule": {
|
||||
"severity": "error",
|
||||
"name": "lib-is-the-floor"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "dependency",
|
||||
"from": "src/lib/hooks/useConnectionStatus.ts",
|
||||
"to": "src/store/authStore.ts",
|
||||
"unresolvedTo": "@/store/authStore",
|
||||
"dependencyTypes": [
|
||||
"aliased",
|
||||
"aliased-tsconfig",
|
||||
"aliased-tsconfig-paths",
|
||||
"local",
|
||||
"import"
|
||||
],
|
||||
"rule": {
|
||||
"severity": "error",
|
||||
"name": "lib-is-the-floor"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "dependency",
|
||||
"from": "src/lib/hooks/useConnectionStatus.ts",
|
||||
"to": "src/store/devOfflineBrowseStore.ts",
|
||||
"unresolvedTo": "@/store/devOfflineBrowseStore",
|
||||
"dependencyTypes": [
|
||||
"aliased",
|
||||
"aliased-tsconfig",
|
||||
"aliased-tsconfig-paths",
|
||||
"local",
|
||||
"import"
|
||||
],
|
||||
"rule": {
|
||||
"severity": "error",
|
||||
"name": "lib-is-the-floor"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "dependency",
|
||||
"from": "src/lib/hooks/useNavidromeAdminRole.ts",
|
||||
"to": "src/store/authStore.ts",
|
||||
"unresolvedTo": "@/store/authStore",
|
||||
"dependencyTypes": [
|
||||
"aliased",
|
||||
"aliased-tsconfig",
|
||||
"aliased-tsconfig-paths",
|
||||
"local",
|
||||
"import"
|
||||
],
|
||||
"rule": {
|
||||
"severity": "error",
|
||||
"name": "lib-is-the-floor"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "dependency",
|
||||
"from": "src/lib/library/hooks/useLibraryAnalysisBackfill.ts",
|
||||
|
||||
Reference in New Issue
Block a user