WebUI: disallow async functions which have no await expression
This commit is contained in:
parent
1077cbba2b
commit
e9fee414df
@ -40,6 +40,7 @@ export default [
|
|||||||
"prefer-const": "error",
|
"prefer-const": "error",
|
||||||
"prefer-template": "error",
|
"prefer-template": "error",
|
||||||
"radix": "error",
|
"radix": "error",
|
||||||
|
"require-await": "error",
|
||||||
"PreferArrowFunctions/prefer-arrow-functions": "error",
|
"PreferArrowFunctions/prefer-arrow-functions": "error",
|
||||||
"Stylistic/no-extra-semi": "error",
|
"Stylistic/no-extra-semi": "error",
|
||||||
"Stylistic/no-mixed-operators": [
|
"Stylistic/no-mixed-operators": [
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
limit: limit
|
limit: limit
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.then(async (response) => {
|
.then((response) => {
|
||||||
if (!response.ok)
|
if (!response.ok)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -72,7 +72,7 @@
|
|||||||
limit: limit
|
limit: limit
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.then(async (response) => {
|
.then((response) => {
|
||||||
if (!response.ok)
|
if (!response.ok)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
tags: tagName
|
tags: tagName
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.then(async (response) => {
|
.then((response) => {
|
||||||
if (!response.ok)
|
if (!response.ok)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -83,7 +83,7 @@
|
|||||||
tags: tagName
|
tags: tagName
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.then(async (response) => {
|
.then((response) => {
|
||||||
if (!response.ok)
|
if (!response.ok)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ window.qBittorrent.Cache ??= (() => {
|
|||||||
class BuildInfoCache {
|
class BuildInfoCache {
|
||||||
#m_store = {};
|
#m_store = {};
|
||||||
|
|
||||||
async init() {
|
init() {
|
||||||
return fetch("api/v2/app/buildInfo", {
|
return fetch("api/v2/app/buildInfo", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
cache: "no-store"
|
cache: "no-store"
|
||||||
@ -80,7 +80,7 @@ window.qBittorrent.Cache ??= (() => {
|
|||||||
// onFailure: () => {},
|
// onFailure: () => {},
|
||||||
// onSuccess: () => {}
|
// onSuccess: () => {}
|
||||||
// }
|
// }
|
||||||
async init(obj = {}) {
|
init(obj = {}) {
|
||||||
return fetch("api/v2/app/preferences", {
|
return fetch("api/v2/app/preferences", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
cache: "no-store"
|
cache: "no-store"
|
||||||
@ -153,7 +153,7 @@ window.qBittorrent.Cache ??= (() => {
|
|||||||
class QbtVersionCache {
|
class QbtVersionCache {
|
||||||
#m_store = "";
|
#m_store = "";
|
||||||
|
|
||||||
async init() {
|
init() {
|
||||||
return fetch("api/v2/app/version", {
|
return fetch("api/v2/app/version", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
cache: "no-store"
|
cache: "no-store"
|
||||||
|
@ -108,7 +108,7 @@
|
|||||||
inactiveSeedingTimeLimit: inactiveSeedingTimeLimitValue
|
inactiveSeedingTimeLimit: inactiveSeedingTimeLimitValue
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.then(async (response) => {
|
.then((response) => {
|
||||||
if (!response.ok)
|
if (!response.ok)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user