Lint + ES6

This commit is contained in:
Liyas Thomas
2020-10-21 13:49:02 +05:30
parent f49c2138de
commit 91a7d20923
5 changed files with 19 additions and 20 deletions

View File

@@ -471,12 +471,12 @@ export default {
if (!fields || fields.length === 0) return []
return fields.filter((field) => {
return this.isTextFoundInGraphqlFieldObject({
return fields.filter((field) =>
this.isTextFoundInGraphqlFieldObject({
text: this.graphqlFieldsFilterText,
graphqlFieldObject: field,
})
})
)
},
isTextFoundInGraphqlFieldObject({ text, graphqlFieldObject }) {
const normalizedText = text.toLowerCase()
@@ -491,9 +491,9 @@ export default {
getFilteredGraphqlFields({ filterText, fields }) {
if (!filterText) return fields
return fields.filter((field) => {
return this.isTextFoundInGraphqlFieldObject({ text: filterText, graphqlFieldObject: field })
})
return fields.filter((field) =>
this.isTextFoundInGraphqlFieldObject({ text: filterText, graphqlFieldObject: field })
)
},
getFilteredGraphqlTypes({ filterText, types }) {
if (!filterText) return types
@@ -509,12 +509,11 @@ export default {
}
const isFilterTextMatchingAtLeastOneField = Object.values(type._fields || {}).some(
(field) => {
return this.isTextFoundInGraphqlFieldObject({
(field) =>
this.isTextFoundInGraphqlFieldObject({
text: filterText,
graphqlFieldObject: field,
})
}
)
return isFilterTextMatchingAtLeastOneField

View File

@@ -1361,7 +1361,7 @@ export default {
: true,
},
currentMethodIndex: 0,
codegens: codegens,
codegens,
methodMenuItems: [
"GET",
"HEAD",
@@ -1416,7 +1416,7 @@ export default {
this.setRouteQueryState()
},
params: {
handler: function (newValue) {
handler(newValue) {
if (!this.paramsWatchEnabled) {
this.paramsWatchEnabled = true
return
@@ -1474,7 +1474,7 @@ export default {
? "application/json"
: ""
},
preRequestScript: function (val, oldVal) {
preRequestScript(val, oldVal) {
this.uri = this.uri
},
},
@@ -1826,7 +1826,7 @@ export default {
httpUser: this.httpUser,
httpPassword: this.httpPassword,
bearerToken: this.bearerToken,
headers: headers,
headers,
rawInput: this.rawInput,
rawParams: this.rawParams,
rawRequestBody: this.rawRequestBody,
@@ -1860,7 +1860,7 @@ export default {
if (env.name === "Globals" || env.name === "globals") {
preRequestScriptString += this.useSelectedEnvironment({
environment: env,
environments: environments,
environments,
})
}
}

View File

@@ -257,9 +257,9 @@ export default {
watch: {
proxySettings: {
deep: true,
handler(value) {
this.applySetting("PROXY_URL", value.url)
this.applySetting("PROXY_KEY", value.key)
handler({ url, key }) {
this.applySetting("PROXY_URL", url)
this.applySetting("PROXY_KEY", key)
},
},
},