Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
:rotating_light: Removing linter warnings
Liyas Thomasbbaa48c1eccb
diff --git a/assets/css/styles.scss b/assets/css/styles.scssindex 574f57c94..7f6c9d5ec 100644--- a/assets/css/styles.scss+++ b/assets/css/styles.scss@@ -592,7 +592,6 @@ pre {select {height: 37px;- background-color: var(--bg-dark-color);cursor: pointer;-webkit-appearance: none;-moz-appearance: none;diff --git a/components/collections/addCollection.vue b/components/collections/addCollection.vueindex c39b7b257..39b7a7675 100644--- a/components/collections/addCollection.vue+++ b/components/collections/addCollection.vue@@ -57,7 +57,7 @@ export default {methods: {addNewCollection() {if (!this.$data.name) {- this.$toast.info('Please provide a valid name for the collection')+ this.$toast.info("Please provide a valid name for the collection");return;}this.$store.commit("postwoman/addNewCollection", {diff --git a/components/collections/editCollection.vue b/components/collections/editCollection.vueindex 98c9154be..084bb78bf 100644--- a/components/collections/editCollection.vue+++ b/components/collections/editCollection.vue@@ -60,7 +60,7 @@ export default {methods: {saveCollection() {if (!this.$data.name) {- this.$toast.info('Please provide a valid name for the collection');+ this.$toast.info("Please provide a valid name for the collection");return;}const collectionUpdated = {diff --git a/components/graphql/queryeditor.vue b/components/graphql/queryeditor.vueindex 7f1084b85..7a4e90c65 100644--- a/components/graphql/queryeditor.vue+++ b/components/graphql/queryeditor.vue@@ -34,7 +34,7 @@ export default {return {editor: null,cacheValue: "",- validationSchema: null+ validationSchema: null};},@@ -88,7 +88,7 @@ export default {);}},-+setValidationSchema(schema) {this.validationSchema = schema;this.parseContents(this.cacheValue);@@ -101,16 +101,15 @@ export default {if (this.validationSchema) {this.editor.session.setAnnotations(- gql.validate(this.validationSchema, doc)- .map((err) => {- return {- row: err.locations[0].line - 1,- column: err.locations[0].column - 1,- text: err.message,- type: "error"- }- })- )+ gql.validate(this.validationSchema, doc).map(err => {+ return {+ row: err.locations[0].line - 1,+ column: err.locations[0].column - 1,+ text: err.message,+ type: "error"+ };+ })+ );}} catch (e) {this.editor.session.setAnnotations([diff --git a/functions/utils/debounce.js b/functions/utils/debounce.jsindex 09acda07d..dffe3f098 100644--- a/functions/utils/debounce.js+++ b/functions/utils/debounce.js@@ -3,13 +3,13 @@// functions which might be called frequently// NOTE : Don't use lambda functions as this doesn't get bound properly in them, use the 'function (args) {}' formatconst debounce = (func, delay) => {- let inDebounce+ let inDebounce;return function() {- const context = this- const args = arguments- clearTimeout(inDebounce)- inDebounce = setTimeout(() => func.apply(context, args), delay)- }-}+ const context = this;+ const args = arguments;+ clearTimeout(inDebounce);+ inDebounce = setTimeout(() => func.apply(context, args), delay);+ };+};export default debounce;diff --git a/layouts/default.vue b/layouts/default.vueindex 15626a247..ce6bdc753 100644--- a/layouts/default.vue+++ b/layouts/default.vue@@ -664,9 +664,8 @@import intializePwa from "../assets/js/pwa";import * as version from "../.postwoman/version.json";import { hasChromeExtensionInstalled } from "../functions/strategies/ChromeStrategy";--import firebase from 'firebase/app';-import { fb } from '../functions/fb';+import firebase from "firebase/app";+import { fb } from "../functions/fb";export default {components: {diff --git a/pages/graphql.vue b/pages/graphql.vueindex 606796472..d4129796c 100644--- a/pages/graphql.vue+++ b/pages/graphql.vue@@ -812,9 +812,7 @@ export default {}}this.gqlTypes = types;-this.$refs.queryEditor.setValidationSchema(schema);-this.$nuxt.$loading.finish();const duration = Date.now() - startTime;this.$toast.info(this.$t("finished_in", { duration }), {