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-template": "error",
|
||||
"radix": "error",
|
||||
"require-await": "error",
|
||||
"PreferArrowFunctions/prefer-arrow-functions": "error",
|
||||
"Stylistic/no-extra-semi": "error",
|
||||
"Stylistic/no-mixed-operators": [
|
||||
|
@ -56,7 +56,7 @@
|
||||
limit: limit
|
||||
})
|
||||
})
|
||||
.then(async (response) => {
|
||||
.then((response) => {
|
||||
if (!response.ok)
|
||||
return;
|
||||
|
||||
@ -72,7 +72,7 @@
|
||||
limit: limit
|
||||
})
|
||||
})
|
||||
.then(async (response) => {
|
||||
.then((response) => {
|
||||
if (!response.ok)
|
||||
return;
|
||||
|
||||
|
@ -64,7 +64,7 @@
|
||||
tags: tagName
|
||||
})
|
||||
})
|
||||
.then(async (response) => {
|
||||
.then((response) => {
|
||||
if (!response.ok)
|
||||
return;
|
||||
|
||||
@ -83,7 +83,7 @@
|
||||
tags: tagName
|
||||
})
|
||||
})
|
||||
.then(async (response) => {
|
||||
.then((response) => {
|
||||
if (!response.ok)
|
||||
return;
|
||||
|
||||
|
@ -53,7 +53,7 @@ window.qBittorrent.Cache ??= (() => {
|
||||
class BuildInfoCache {
|
||||
#m_store = {};
|
||||
|
||||
async init() {
|
||||
init() {
|
||||
return fetch("api/v2/app/buildInfo", {
|
||||
method: "GET",
|
||||
cache: "no-store"
|
||||
@ -80,7 +80,7 @@ window.qBittorrent.Cache ??= (() => {
|
||||
// onFailure: () => {},
|
||||
// onSuccess: () => {}
|
||||
// }
|
||||
async init(obj = {}) {
|
||||
init(obj = {}) {
|
||||
return fetch("api/v2/app/preferences", {
|
||||
method: "GET",
|
||||
cache: "no-store"
|
||||
@ -153,7 +153,7 @@ window.qBittorrent.Cache ??= (() => {
|
||||
class QbtVersionCache {
|
||||
#m_store = "";
|
||||
|
||||
async init() {
|
||||
init() {
|
||||
return fetch("api/v2/app/version", {
|
||||
method: "GET",
|
||||
cache: "no-store"
|
||||
|
@ -108,7 +108,7 @@
|
||||
inactiveSeedingTimeLimit: inactiveSeedingTimeLimitValue
|
||||
})
|
||||
})
|
||||
.then(async (response) => {
|
||||
.then((response) => {
|
||||
if (!response.ok)
|
||||
return;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user