Merge pull request #92 from foyzulkarim/add-code-quality-qodona #2
Annotations
26 warnings and 22 notices
Equality operator may cause type coercion:
server/scripts/shell-script.mjs#L8
Comparison opsys == "win32" may cause unexpected type coercion
|
Equality operator may cause type coercion:
server/scripts/shell-script.mjs#L10
Comparison opsys == "darwin" may cause unexpected type coercion
|
Equality operator may cause type coercion:
server/scripts/shell-script.mjs#L10
Comparison opsys == "linux" may cause unexpected type coercion
|
Equality operator may cause type coercion:
server/scripts/shell-script.mjs#L8
Comparison opsys == "win64" may cause unexpected type coercion
|
Suspicious variable/parameter name combination:
client/src/components/iconify/Iconify.js#L11
'width' should probably not be assigned to 'height'
|
Unused local symbol:
server/src/modules/db/mongo.js#L5
Unused constant winstonMongo
|
Unused local symbol:
server/scripts/seed-data/role.js#L5
Unused parameter x
|
Unused local symbol:
server/src/modules/queues/handlers.js#L8
Unused constant generateThumbnail
|
Unused local symbol:
server/src/modules/models/video/controller.js#L109
Unused constant storage
|
Unused local symbol:
server/src/modules/models/video/controller.js#L14
Unused constant QUEUE_EVENTS
|
Unused local symbol:
server/src/modules/models/role/service.js#L2
Unused constant MongoManager
|
Unused local symbol:
server/src/modules/models/role/service.js#L1
Unused constant ObjectId
|
Unused local symbol:
server/src/modules/models/role/service.js#L24
Unused constant search
|
Unused local symbol:
server/src/modules/models/video/controller.js#L16
Unused constant addQueueItem
|
Unused local symbol:
client/src/pages/VideoEditPage.js#L134
Unused parameter videoInfo
|
Unused local symbol:
server/src/modules/models/video/controller.js#L18
Unused constant getVideoDurationAndResolution
|
Unnecessary 'return' statement:
server/src/modules/queues/video-processor.js#L49
`return` is unnecessary as the last statement in a function with no return value
|
Unnecessary 'return' statement:
server/src/modules/queues/handlers.js#L40
`return` is unnecessary as the last statement in a function with no return value
|
Unnecessary 'return' statement:
server/src/modules/queues/handlers.js#L65
`return` is unnecessary as the last statement in a function with no return value
|
Unnecessary 'return' statement:
server/src/modules/queues/video-processor.js#L112
`return` is unnecessary as the last statement in a function with no return value
|
Unnecessary 'return' statement:
server/src/modules/queues/video-processor.js#L70
`return` is unnecessary as the last statement in a function with no return value
|
Unnecessary 'return' statement:
server/src/modules/queues/handlers.js#L30
`return` is unnecessary as the last statement in a function with no return value
|
Unnecessary 'return' statement:
server/src/modules/queues/handlers.js#L20
`return` is unnecessary as the last statement in a function with no return value
|
Unnecessary 'return' statement:
server/src/modules/queues/handlers.js#L55
`return` is unnecessary as the last statement in a function with no return value
|
Unnecessary 'return' statement:
server/src/modules/models/video/controller.js#L165
`return` is unnecessary as the last statement in a function with no return value
|
Unnecessary 'return' statement:
server/src/modules/models/video/controller.js#L206
`return` is unnecessary as the last statement in a function with no return value
|
Missing await for an async function call:
server/src/modules/models/role/controller.js#L22
Missing await for an async function call
|
Missing await for an async function call:
server/src/modules/queues/video-processor.js#L45
Missing await for an async function call
|
Missing await for an async function call:
server/src/modules/models/video/controller.js#L99
Missing await for an async function call
|
Missing await for an async function call:
server/src/modules/models/video/controller.js#L200
Missing await for an async function call
|
Missing await for an async function call:
server/src/modules/models/role/controller.js#L13
Missing await for an async function call
|
Redundant 'await' expression:
server/src/modules/models/role/service.js#L45
Redundant 'await' for a non-promise type
|
Redundant 'await' expression:
server/src/modules/db/schemas/common.js#L53
Redundant 'await' for a non-promise type
|
Redundant 'await' expression:
server/src/modules/db/collections.js#L73
Redundant 'await' for a non-promise type
|
Signature mismatch:
client/src/pages/VideoListPage.js#L141
Argument type
function(any): any \& {
pageNumber,
limit: number
}
is not assignable to parameter type
((prevState: {
filterKey: string,
sortValue: number,
isDecending: boolean,
sortKey: string,
pageNumber: number,
filterValue: string,
limit: number,
keyword: string
}) =\> {
filterKey: string,
sortValue: number,
isDecending: boolean,
sortKey: string,
pageNumber: number,
filterValue: string,
limit: number,
keyword: string
}) \| {
filterKey: string,
sortValue: number,
isDecending: boolean,
sortKey: string,
pageNumber: number,
filterValue: string,
limit: number,
keyword: string
}
Type string is not assignable to type undefined
Type
function(any): any \& {
pageNumber,
limit: number
}
is not assignable to type
(prevState: {
filterKey: string,
sortValue: number,
isDecending: boolean,
sortKey: string,
pageNumber: number,
filterValue: string,
limit: number,
keyword: string
}) =\> {
filterKey: string,
sortValue: number,
isDecending: boolean,
sortKey: string,
pageNumber: number,
filterValue: string,
limit: number,
keyword: string
}
|
Signature mismatch:
client/src/pages/VideoListPage.js#L152
Argument type
function(any): any \& {
sortValue: number \| number,
isDecending: boolean,
sortKey: any
}
is not assignable to parameter type
((prevState: {
filterKey: string,
sortValue: number,
isDecending: boolean,
sortKey: string,
pageNumber: number,
filterValue: string,
limit: number,
keyword: string
}) =\> {
filterKey: string,
sortValue: number,
isDecending: boolean,
sortKey: string,
pageNumber: number,
filterValue: string,
limit: number,
keyword: string
}) \| {
filterKey: string,
sortValue: number,
isDecending: boolean,
sortKey: string,
pageNumber: number,
filterValue: string,
limit: number,
keyword: string
}
Type string is not assignable to type undefined
Type
function(any): any \& {
sortValue: number \| number,
isDecending: boolean,
sortKey: any
}
is not assignable to type
(prevState: {
filterKey: string,
sortValue: number,
isDecending: boolean,
sortKey: string,
pageNumber: number,
filterValue: string,
limit: number,
keyword: string
}) =\> {
filterKey: string,
sortValue: number,
isDecending: boolean,
sortKey: string,
pageNumber: number,
filterValue: string,
limit: number,
keyword: string
}
|
Signature mismatch:
client/src/layouts/dashboard/header/NotificationsPopover.js#L96
Argument type (any \& { isUnRead: boolean })\[\] is not assignable to parameter type
((prevState: \[{
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: null,
title: string,
type: string
}, {
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: string,
title: any,
type: string
}, {
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: null,
title: string,
type: string
}, {
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: null,
title: string,
type: string
}, {
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: null,
title: string,
type: string
}\]) =\> \[{
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: null,
title: string,
type: string
}, {
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: string,
title: any,
type: string
}, {
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: null,
title: string,
type: string
}, {
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: null,
title: string,
type: string
}, {
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: null,
title: string,
type: string
}\]) \| \[{
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: null,
title: string,
type: string
}, {
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: string,
title: any,
type: string
}, {
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: null,
title: string,
type: string
}, {
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: null,
title: string,
type: string
}, {
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: null,
title: string,
type: string
}\]
...
Type (any \& { isUnRead: boolean })\[\] is not assignable to type
\[{
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: null,
title: string,
type: string
}, {
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: string,
title: any,
type: string
}, {
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: null,
title: string,
type: string
}, {
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: null,
title: string,
type: string
}, {
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: null,
title: string,
type: string
}\]
Type (any \& { isUnRead: boolean })\[\] is not assignable to type
({
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: null,
title: string,
type: string
} \| {
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: string,
title: any,
type: string
} \| {
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: null,
title: string,
type: string
} \| {
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: null,
title: string,
type: string
} \| {
createdAt: any,
isUnRead: boolean,
description: string,
id: any,
avatar: null,
title: string,
type: string
})\[\]
|
Signature mismatch:
client/src/pages/VideoListPage.js#L165
Argument type
function(any): any \& {
filterKey: any,
filterValue: any,
keyword: any
}
is not assignable to parameter type
((prevState: {
filterKey: string,
sortValue: number,
isDecending: boolean,
sortKey: string,
pageNumber: number,
filterValue: string,
limit: number,
keyword: string
}) =\> {
filterKey: string,
sortValue: number,
isDecending: boolean,
sortKey: string,
pageNumber: number,
filterValue: string,
limit: number,
keyword: string
}) \| {
filterKey: string,
sortValue: number,
isDecending: boolean,
sortKey: string,
pageNumber: number,
filterValue: string,
limit: number,
keyword: string
}
Type string is not assignable to type undefined
Type
function(any): any \& {
filterKey: any,
filterValue: any,
keyword: any
}
is not assignable to type
(prevState: {
filterKey: string,
sortValue: number,
isDecending: boolean,
sortKey: string,
pageNumber: number,
filterValue: string,
limit: number,
keyword: string
}) =\> {
filterKey: string,
sortValue: number,
isDecending: boolean,
sortKey: string,
pageNumber: number,
filterValue: string,
limit: number,
keyword: string
}
|
Deprecated symbol used:
server/scripts/shell-script.mjs#L6
Deprecated symbol used, consult docs for better alternative
|
Result of method call returning a promise is ignored:
server/src/queue.js#L13
Promise returned from setup is ignored
|
Result of method call returning a promise is ignored:
server/src/modules/queues/video-processor.js#L9
Promise returned from configureFFMPEG is ignored
|
Result of method call returning a promise is ignored:
client/src/serviceWorker.js#L129
Promise returned from unregister is ignored
|
Result of method call returning a promise is ignored:
client/src/pages/VideosPage.js#L31
Promise returned from getData is ignored
|
Result of method call returning a promise is ignored:
client/src/pages/VideoListPage.js#L107
Promise returned from getData is ignored
|
Result of method call returning a promise is ignored:
client/src/pages/VideoPlayerPage.js#L97
Promise returned from fetchData is ignored
|
Result of method call returning a promise is ignored:
client/src/pages/VideoEditPage.js#L89
Promise returned from fetchData is ignored
|
Result of method call returning a promise is ignored:
client/src/pages/VideoListPage.js#L126
Promise returned from getCount is ignored
|
Type mismatch:
client/src/components/logo/Logo.js#L88
Assigned expression type { sx: any, disabledLink: any } is not assignable to type
WeakValidationMap\<PropsWithoutRef\<{}\> \& RefAttributes\<unknown\>\> \| undefined
|