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
chores: Lint + dependency update
Liyas Thomas7e1e61f8af10
diff --git a/components/collections/import-export-collections.vue b/components/collections/import-export-collections.vueindex 4b4100d83..dbba1f8f2 100644--- a/components/collections/import-export-collections.vue+++ b/components/collections/import-export-collections.vue@@ -323,7 +323,10 @@ export default {return Object.prototype.hasOwnProperty.call(item, "item")},isSubFolder(item) {- return Object.prototype.hasOwnProperty.call(item, "_postman_isSubFolder") && item._postman_isSubFolder+ return (+ Object.prototype.hasOwnProperty.call(item, "_postman_isSubFolder") &&+ item._postman_isSubFolder+ )},flattenPostmanItem(subFolder, subFolderGlue = " -- ") {delete subFolder._postman_isSubFolderdiff --git a/components/realtime/socketio.vue b/components/realtime/socketio.vueindex 2d0239645..a012bc0e7 100644--- a/components/realtime/socketio.vue+++ b/components/realtime/socketio.vue@@ -14,14 +14,10 @@/></li><div>- <li>- <label for="socketio-path">{{ $t("path") }}</label>- <input- id="socketio-path"- spellcheck="false"- v-model="path"- />- </li>+ <li>+ <label for="socketio-path">{{ $t("path") }}</label>+ <input id="socketio-path" spellcheck="false" v-model="path" />+ </li></div><div><li>@@ -125,11 +121,11 @@ export default {]try {- if(!this.path){- this.path = '/socket.io'+ if (!this.path) {+ this.path = "/socket.io"}- this.io = new io(this.url,{- path: this.path+ this.io = new io(this.url, {+ path: this.path,})// Add ability to listen to all eventswildcard(io.Manager)(this.io)diff --git a/components/ui/__tests__/autocomplete.spec.js b/components/ui/__tests__/autocomplete.spec.jsindex 40463bf4e..663b8c35e 100644--- a/components/ui/__tests__/autocomplete.spec.js+++ b/components/ui/__tests__/autocomplete.spec.js@@ -89,7 +89,7 @@ describe("autocomplete", () => {await selectedSuggestion.trigger("click")await wrapper.vm.$nextTick()- expect(input.element.value).toEqual("b" + selectedText)+ expect(input.element.value).toEqual(`b${selectedText}`)})test("hide selection on pressing ESC", async () => {@@ -255,7 +255,7 @@ describe("autocomplete", () => {})await wrapper.vm.$nextTick()- expect(input.element.value).toEqual("a" + selectedSuggestion)+ expect(input.element.value).toEqual(`a${selectedSuggestion}`)})test("pressing tab when nothing is selected selects the first suggestion", async () => {@@ -272,7 +272,7 @@ describe("autocomplete", () => {})await wrapper.vm.$nextTick()- expect(input.element.value).toEqual("a" + firstSuggestionText)+ expect(input.element.value).toEqual(`a${firstSuggestionText}`)})test("pressing any non-special key doesn't do anything", async () => {@@ -294,6 +294,6 @@ describe("autocomplete", () => {})await wrapper.vm.$nextTick()- expect(input.element.value).toEqual("a" + selectedSuggestion)+ expect(input.element.value).toEqual(`a${selectedSuggestion}`)})})diff --git a/components/ui/url-field.vue b/components/ui/url-field.vueindex 204d6dbee..403bf41d0 100644--- a/components/ui/url-field.vue+++ b/components/ui/url-field.vue@@ -1,20 +1,24 @@<template><div contenteditable class="url-field" ref="editor" spellcheck="false"></div></template>+<style lang="scss">.highlight-VAR {@apply font-bold;- color: var(--ac-color);+ @apply text-acColor;}+.highlight-TEXT {@apply overflow-auto;@apply break-all;- height: 20px;+ height: 22px;}+.highlight-TEXT::-webkit-scrollbar {@apply hidden;}</style>+<script>export default {props: {@@ -81,9 +85,9 @@ export default {return map},- getTextSegments(element) {+ getTextSegments({ childNodes }) {const textSegments = []- Array.from(element.childNodes).forEach((node) => {+ Array.from(childNodes).forEach((node) => {switch (node.nodeType) {case Node.TEXT_NODE:textSegments.push({ text: node.nodeValue, node })diff --git a/functions/package.json b/functions/package.jsonindex d931442d0..cdf7b5b88 100644--- a/functions/package.json+++ b/functions/package.json@@ -13,10 +13,10 @@},"dependencies": {"firebase-admin": "^9.2.0",- "firebase-functions": "^3.9.1"+ "firebase-functions": "^3.11.0"},"devDependencies": {- "firebase-functions-test": "^0.2.1"+ "firebase-functions-test": "^0.2.2"},"private": true}diff --git a/helpers/__tests__/network.spec.js b/helpers/__tests__/network.spec.jsindex a6cce5570..c2e0ab071 100644--- a/helpers/__tests__/network.spec.js+++ b/helpers/__tests__/network.spec.js@@ -6,22 +6,18 @@ import ExtensionStrategy, {hasExtensionInstalled,} from "../strategies/ExtensionStrategy"-jest.mock("../strategies/AxiosStrategy", () => {- return {- __esModule: true,- default: jest.fn(() => Promise.resolve()),- cancelRunningAxiosRequest: jest.fn(() => Promise.resolve()),- }-})--jest.mock("../strategies/ExtensionStrategy", () => {- return {- __esModule: true,- default: jest.fn(() => Promise.resolve()),- cancelRunningExtensionRequest: jest.fn(() => Promise.resolve()),- hasExtensionInstalled: jest.fn(),- }-})+jest.mock("../strategies/AxiosStrategy", () => ({+ __esModule: true,+ default: jest.fn(() => Promise.resolve()),+ cancelRunningAxiosRequest: jest.fn(() => Promise.resolve()),+}))++jest.mock("../strategies/ExtensionStrategy", () => ({+ __esModule: true,+ default: jest.fn(() => Promise.resolve()),+ cancelRunningExtensionRequest: jest.fn(() => Promise.resolve()),+ hasExtensionInstalled: jest.fn(),+}))const extensionAllowedStore = {state: {diff --git a/helpers/codegen/codegen.js b/helpers/codegen/codegen.jsindex 9d9f9054b..cb69b0943 100644--- a/helpers/codegen/codegen.js+++ b/helpers/codegen/codegen.js@@ -14,7 +14,7 @@ export const codegens = [JSXHRCodegen, JSFetchCodegen, CurlCodegen]export function generateCodeWithGenerator(codegenID, context) {if (codegenID) {- const gen = codegens.find((e) => e.id === codegenID)+ const gen = codegens.find(({ id }) => id === codegenID)return gen ? gen.generator(context) : ""}diff --git a/helpers/lenses/__tests__/lenses.spec.js b/helpers/lenses/__tests__/lenses.spec.jsindex cf52b7391..4db416574 100644--- a/helpers/lenses/__tests__/lenses.spec.js+++ b/helpers/lenses/__tests__/lenses.spec.js@@ -21,7 +21,7 @@ describe("getSuitableLenses", () => {})lenses- .filter((e) => e.lensName != rawLens.lensName)+ .filter(({ lensName }) => lensName != rawLens.lensName).forEach((el) => {test(`returns ${el.lensName} lens for its content-types`, () => {el.supportedContentTypes.forEach((contentType) => {@@ -53,9 +53,9 @@ describe("getLensRenderers", () => {test("returns all the lens renderers", () => {const res = getLensRenderers()- lenses.forEach((lens) => {- expect(res).toHaveProperty(lens.renderer)- expect(res[lens.renderer]).toBe(lens.rendererImport)+ lenses.forEach(({ renderer, rendererImport }) => {+ expect(res).toHaveProperty(renderer)+ expect(res[renderer]).toBe(rendererImport)})})})diff --git a/helpers/strategies/__tests__/AxiosStrategy-Proxy.spec.js b/helpers/strategies/__tests__/AxiosStrategy-Proxy.spec.jsindex efce48551..144c607a0 100644--- a/helpers/strategies/__tests__/AxiosStrategy-Proxy.spec.js+++ b/helpers/strategies/__tests__/AxiosStrategy-Proxy.spec.js@@ -1,12 +1,10 @@import axios from "axios"import axiosStrategy, { testables, cancelRunningAxiosRequest } from "../AxiosStrategy"-jest.mock("../../utils/b64", () => {- return {- __esModule: true,- decodeB64StringToArrayBuffer: jest.fn((data) => data + "-converted"),- }-})+jest.mock("../../utils/b64", () => ({+ __esModule: true,+ decodeB64StringToArrayBuffer: jest.fn((data) => `${data}-converted`),+}))describe("cancelRunningAxiosRequest", () => {test("cancels axios request and does that only 1 time", () => {diff --git a/helpers/strategies/__tests__/ExtensionStrategy.spec.js b/helpers/strategies/__tests__/ExtensionStrategy.spec.jsindex ce0c6161e..20812e958 100644--- a/helpers/strategies/__tests__/ExtensionStrategy.spec.js+++ b/helpers/strategies/__tests__/ExtensionStrategy.spec.js@@ -5,12 +5,10 @@ import extensionStrategy, {cancelRunningExtensionRequest,} from "../ExtensionStrategy"-jest.mock("../../utils/b64", () => {- return {- __esModule: true,- decodeB64StringToArrayBuffer: jest.fn((data) => data + "-converted"),- }-})+jest.mock("../../utils/b64", () => ({+ __esModule: true,+ decodeB64StringToArrayBuffer: jest.fn((data) => `${data}-converted`),+}))describe("hasExtensionInstalled", () => {test("returns true if extension is present and hooked", () => {diff --git a/package-lock.json b/package-lock.jsonindex f2649d37d..7f7edc4ee 100644--- a/package-lock.json+++ b/package-lock.json@@ -1185,12 +1185,12 @@},"dependencies": {"debug": {- "version": "4.1.1",- "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",- "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",+ "version": "4.2.0",+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",+ "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==","dev": true,"requires": {- "ms": "^2.1.1"+ "ms": "2.1.2"}},"globals": {@@ -6694,9 +6694,9 @@}},"eslint": {- "version": "7.9.0",- "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.9.0.tgz",- "integrity": "sha512-V6QyhX21+uXp4T+3nrNfI3hQNBDa/P8ga7LoQOenwrlEFXrEnUEE+ok1dMtaS3b6rmLXhT1TkTIsG75HMLbknA==",+ "version": "7.10.0",+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.10.0.tgz",+ "integrity": "sha512-BDVffmqWl7JJXqCjAK6lWtcQThZB/aP1HXSH1JKwGwv0LQEdvpR7qzNrUT487RM39B5goWuboFad5ovMBmD8yA==","dev": true,"requires": {"@babel/code-frame": "^7.0.0",@@ -6707,7 +6707,7 @@"debug": "^4.0.1","doctrine": "^3.0.0","enquirer": "^2.3.5",- "eslint-scope": "^5.1.0",+ "eslint-scope": "^5.1.1","eslint-utils": "^2.1.0","eslint-visitor-keys": "^1.3.0","espree": "^7.3.0",@@ -6739,12 +6739,12 @@},"dependencies": {"debug": {- "version": "4.1.1",- "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",- "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",+ "version": "4.2.0",+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",+ "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==","dev": true,"requires": {- "ms": "^2.1.1"+ "ms": "2.1.2"}},"eslint-scope": {diff --git a/package.json b/package.jsonindex 30c6c0f61..f5c695ac0 100644--- a/package.json+++ b/package.json@@ -59,7 +59,7 @@"@vue/test-utils": "^1.1.0","babel-core": "^7.0.0-bridge.0","babel-jest": "^26.3.0",- "eslint": "^7.9.0",+ "eslint": "^7.10.0","eslint-plugin-vue": "^6.2.2","husky": "^4.3.0","jest": "^26.4.2",