Merge pull request #92 from foyzulkarim/add-code-quality-qodona #2
48 new problems found by Qodana for JS
Qodana for JS
48 new problems were found
Inspection name | Severity | Problems |
---|---|---|
Unused local symbol |
🔶 Warning | 11 |
Unnecessary 'return' statement |
🔶 Warning | 10 |
Equality operator may cause type coercion |
🔶 Warning | 4 |
Suspicious variable/parameter name combination |
🔶 Warning | 1 |
Result of method call returning a promise is ignored |
◽️ Notice | 8 |
Missing await for an async function call |
◽️ Notice | 5 |
Signature mismatch |
◽️ Notice | 4 |
Redundant 'await' expression |
◽️ Notice | 3 |
Deprecated symbol used |
◽️ Notice | 1 |
Type mismatch |
◽️ Notice | 1 |
💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report
Contact Qodana team
Contact us at [email protected]
- Or via our issue tracker: https://jb.gg/qodana-issue
- Or share your feedback: https://jb.gg/qodana-discussions
Details
This result was published with Qodana GitHub Action
Annotations
Check notice on line 22 in server/src/modules/models/role/controller.js
github-actions / Qodana for JS
Missing await for an async function call
Missing await for an async function call
Check notice on line 45 in server/src/modules/queues/video-processor.js
github-actions / Qodana for JS
Missing await for an async function call
Missing await for an async function call
Check notice on line 99 in server/src/modules/models/video/controller.js
github-actions / Qodana for JS
Missing await for an async function call
Missing await for an async function call
Check notice on line 200 in server/src/modules/models/video/controller.js
github-actions / Qodana for JS
Missing await for an async function call
Missing await for an async function call
Check notice on line 13 in server/src/modules/models/role/controller.js
github-actions / Qodana for JS
Missing await for an async function call
Missing await for an async function call
Check notice on line 45 in server/src/modules/models/role/service.js
github-actions / Qodana for JS
Redundant 'await' expression
Redundant 'await' for a non-promise type
Check notice on line 53 in server/src/modules/db/schemas/common.js
github-actions / Qodana for JS
Redundant 'await' expression
Redundant 'await' for a non-promise type
Check notice on line 73 in server/src/modules/db/collections.js
github-actions / Qodana for JS
Redundant 'await' expression
Redundant 'await' for a non-promise type
Check notice on line 141 in client/src/pages/VideoListPage.js
github-actions / Qodana for JS
Signature mismatch
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
}
Check notice on line 152 in client/src/pages/VideoListPage.js
github-actions / Qodana for JS
Signature mismatch
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
}
Check notice on line 96 in client/src/layouts/dashboard/header/NotificationsPopover.js
github-actions / Qodana for JS
Signature mismatch
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
})\[\]
Check notice on line 165 in client/src/pages/VideoListPage.js
github-actions / Qodana for JS
Signature mismatch
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
}
Check notice on line 6 in server/scripts/shell-script.mjs
github-actions / Qodana for JS
Deprecated symbol used
Deprecated symbol used, consult docs for better alternative
Check warning on line 8 in server/scripts/shell-script.mjs
github-actions / Qodana for JS
Equality operator may cause type coercion
Comparison opsys == "win32" may cause unexpected type coercion
Check warning on line 10 in server/scripts/shell-script.mjs
github-actions / Qodana for JS
Equality operator may cause type coercion
Comparison opsys == "darwin" may cause unexpected type coercion
Check warning on line 10 in server/scripts/shell-script.mjs
github-actions / Qodana for JS
Equality operator may cause type coercion
Comparison opsys == "linux" may cause unexpected type coercion
Check warning on line 8 in server/scripts/shell-script.mjs
github-actions / Qodana for JS
Equality operator may cause type coercion
Comparison opsys == "win64" may cause unexpected type coercion
Check notice on line 13 in server/src/queue.js
github-actions / Qodana for JS
Result of method call returning a promise is ignored
Promise returned from setup is ignored
Check notice on line 9 in server/src/modules/queues/video-processor.js
github-actions / Qodana for JS
Result of method call returning a promise is ignored
Promise returned from configureFFMPEG is ignored
Check notice on line 129 in client/src/serviceWorker.js
github-actions / Qodana for JS
Result of method call returning a promise is ignored
Promise returned from unregister is ignored
Check notice on line 31 in client/src/pages/VideosPage.js
github-actions / Qodana for JS
Result of method call returning a promise is ignored
Promise returned from getData is ignored
Check notice on line 107 in client/src/pages/VideoListPage.js
github-actions / Qodana for JS
Result of method call returning a promise is ignored
Promise returned from getData is ignored
Check notice on line 97 in client/src/pages/VideoPlayerPage.js
github-actions / Qodana for JS
Result of method call returning a promise is ignored
Promise returned from fetchData is ignored
Check notice on line 89 in client/src/pages/VideoEditPage.js
github-actions / Qodana for JS
Result of method call returning a promise is ignored
Promise returned from fetchData is ignored
Check notice on line 126 in client/src/pages/VideoListPage.js
github-actions / Qodana for JS
Result of method call returning a promise is ignored
Promise returned from getCount is ignored