Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

chore: lint

liyasthomasffd1acdfae22
diff --git a/packages/codemirror-lang-graphql/rollup.config.js b/packages/codemirror-lang-graphql/rollup.config.js
index f4367e403..44dffbd51 100644
--- a/packages/codemirror-lang-graphql/rollup.config.js
+++ b/packages/codemirror-lang-graphql/rollup.config.js
@@ -1,12 +1,12 @@
import typescript from "rollup-plugin-ts"
-import {lezer} from "@lezer/generator/rollup"
+import { lezer } from "@lezer/generator/rollup"
export default {
input: "src/index.js",
- external: id => id != "tslib" && !/^(\.?\/|\w:)/.test(id),
+ external: (id) => id != "tslib" && !/^(\.?\/|\w:)/.test(id),
output: [
- {file: "dist/index.cjs", format: "cjs"},
- {dir: "./dist", format: "es"}
+ { file: "dist/index.cjs", format: "cjs" },
+ { dir: "./dist", format: "es" },
],
- plugins: [lezer(), typescript()]
+ plugins: [lezer(), typescript()],
}
diff --git a/packages/codemirror-lang-graphql/src/index.js b/packages/codemirror-lang-graphql/src/index.js
index 49af63dfc..bb35c455c 100644
--- a/packages/codemirror-lang-graphql/src/index.js
+++ b/packages/codemirror-lang-graphql/src/index.js
@@ -1,22 +1,30 @@
-import {parser} from "./syntax.grammar"
-import {LRLanguage, LanguageSupport, indentNodeProp, foldNodeProp, foldInside, delimitedIndent} from "@codemirror/language"
-import {styleTags, tags as t} from "@codemirror/highlight"
+import { parser } from "./syntax.grammar"
+import {
+ LRLanguage,
+ LanguageSupport,
+ indentNodeProp,
+ foldNodeProp,
+ foldInside,
+ delimitedIndent,
+} from "@codemirror/language"
+import { styleTags, tags as t } from "@codemirror/highlight"
export const GQLLanguage = LRLanguage.define({
parser: parser.configure({
props: [
indentNodeProp.add({
- "SelectionSet FieldsDefinition ObjectValue SchemaDefinition RootTypeDef": delimitedIndent({ closing: "}", align: true }),
+ "SelectionSet FieldsDefinition ObjectValue SchemaDefinition RootTypeDef":
+ delimitedIndent({ closing: "}", align: true }),
}),
foldNodeProp.add({
Application: foldInside,
- "SelectionSet FieldsDefinition ObjectValue RootOperationTypeDefinition RootTypeDef": (node) => {
- return {
- from: node.from,
- to: node.to
- }
-
- }
+ "SelectionSet FieldsDefinition ObjectValue RootOperationTypeDefinition RootTypeDef":
+ (node) => {
+ return {
+ from: node.from,
+ to: node.to,
+ }
+ },
}),
styleTags({
Name: t.definition(t.variableName),
@@ -29,13 +37,13 @@ export const GQLLanguage = LRLanguage.define({
NullValue: t.null,
ObjectValue: t.brace,
Comment: t.lineComment,
- })
- ]
+ }),
+ ],
}),
languageData: {
commentTokens: { line: "#" },
- closeBrackets: { brackets: ["(", "[", "{", '"', '"""'] }
- }
+ closeBrackets: { brackets: ["(", "[", "{", '"', '"""'] },
+ },
})
export function GQL() {
diff --git a/packages/codemirror-lang-graphql/tsconfig.json b/packages/codemirror-lang-graphql/tsconfig.json
index d91b09866..7eaca8b2e 100644
--- a/packages/codemirror-lang-graphql/tsconfig.json
+++ b/packages/codemirror-lang-graphql/tsconfig.json
@@ -6,7 +6,7 @@
"newLine": "lf",
"declaration": true,
"moduleResolution": "node",
- "allowJs": true,
+ "allowJs": true
},
"include": ["src/*"]
-}
\ No newline at end of file
+}
diff --git a/packages/hoppscotch-data/rollup.config.js b/packages/hoppscotch-data/rollup.config.js
index b9f5b1422..0dc2afc63 100644
--- a/packages/hoppscotch-data/rollup.config.js
+++ b/packages/hoppscotch-data/rollup.config.js
@@ -1,13 +1,13 @@
-import dts from 'rollup-plugin-dts'
-import esbuild from 'rollup-plugin-esbuild'
-import multi from '@rollup/plugin-multi-entry'
+import dts from "rollup-plugin-dts"
+import esbuild from "rollup-plugin-esbuild"
+import multi from "@rollup/plugin-multi-entry"
-const name = require('./package.json').main.replace(/\.js$/, '')
+const name = require("./package.json").main.replace(/\.js$/, "")
-const bundle = config => ({
+const bundle = (config) => ({
...config,
- input: 'src/**/*.ts',
- external: id => !/^[./]/.test(id),
+ input: "src/**/*.ts",
+ external: (id) => !/^[./]/.test(id),
})
export default [
@@ -16,12 +16,12 @@ export default [
output: [
{
file: `${name}.js`,
- format: 'cjs',
+ format: "cjs",
sourcemap: true,
},
{
file: `${name}.mjs`,
- format: 'es',
+ format: "es",
sourcemap: true,
},
],
@@ -30,7 +30,7 @@ export default [
plugins: [dts()],
output: {
file: `${name}.d.ts`,
- format: 'es',
+ format: "es",
},
}),
]
diff --git a/packages/hoppscotch-data/src/graphql/index.ts b/packages/hoppscotch-data/src/graphql/index.ts
index d029034d8..d67f73740 100644
--- a/packages/hoppscotch-data/src/graphql/index.ts
+++ b/packages/hoppscotch-data/src/graphql/index.ts
@@ -38,4 +38,4 @@ export function makeGQLRequest(x: Omit<HoppGQLRequest, "v">) {
v: 1,
...x,
}
-}
\ No newline at end of file
+}
diff --git a/packages/hoppscotch-data/src/index.ts b/packages/hoppscotch-data/src/index.ts
index c04248957..0796234a1 100644
--- a/packages/hoppscotch-data/src/index.ts
+++ b/packages/hoppscotch-data/src/index.ts
@@ -1,2 +1,2 @@
export * from "./rest"
-export * from "./graphql"
\ No newline at end of file
+export * from "./graphql"
diff --git a/packages/hoppscotch-data/src/rest/content-types.ts b/packages/hoppscotch-data/src/rest/content-types.ts
index 1950d673f..2435422dc 100644
--- a/packages/hoppscotch-data/src/rest/content-types.ts
+++ b/packages/hoppscotch-data/src/rest/content-types.ts
@@ -10,4 +10,4 @@ export const knownContentTypes = {
"text/plain": "plain",
}
-export type ValidContentTypes = keyof typeof knownContentTypes
\ No newline at end of file
+export type ValidContentTypes = keyof typeof knownContentTypes
diff --git a/packages/hoppscotch-data/tsconfig.json b/packages/hoppscotch-data/tsconfig.json
index 9e5ddf62d..0e105b88c 100644
--- a/packages/hoppscotch-data/tsconfig.json
+++ b/packages/hoppscotch-data/tsconfig.json
@@ -9,4 +9,4 @@
"strictNullChecks": true,
"resolveJsonModule": true
}
-}
\ No newline at end of file
+}
diff --git a/packages/hoppscotch-data/tsup.config.ts b/packages/hoppscotch-data/tsup.config.ts
index 0a65a40d7..902781f26 100644
--- a/packages/hoppscotch-data/tsup.config.ts
+++ b/packages/hoppscotch-data/tsup.config.ts
@@ -1,8 +1,8 @@
-import { Options } from 'tsup'
+import { Options } from "tsup"
const options: Options = {
format: [
- 'cjs',
+ "cjs",
// loading Babel in ESM is tricky, since Babel itself it CJS only
// we decided to drop ESM support until Babel supports native ESM
// 'esm',
@@ -10,9 +10,7 @@ const options: Options = {
clean: true,
splitting: true,
dts: true,
- entryPoints: [
- 'src/**/*.ts',
- ],
+ entryPoints: ["src/**/*.ts"],
}
-export default options
\ No newline at end of file
+export default options
diff --git a/packages/hoppscotch-js-sandbox/tsconfig.json b/packages/hoppscotch-js-sandbox/tsconfig.json
index a84a776b0..2bacfb49c 100644
--- a/packages/hoppscotch-js-sandbox/tsconfig.json
+++ b/packages/hoppscotch-js-sandbox/tsconfig.json
@@ -10,11 +10,7 @@
"~/*": ["./src/*"],
"@/*": ["./src/*"]
},
- "types": [
- "@types/node",
- "@types/jest",
- "@relmify/jest-fp-ts"
- ],
+ "types": ["@types/node", "@types/jest", "@relmify/jest-fp-ts"],
"outDir": "./lib/",
"rootDir": "./src/",
"declaration": true,
@@ -23,4 +19,4 @@
},
"include": ["./src", "./src/global.d.ts"],
"exclude": ["node_modules", "./src/__tests__", "./src/demo.ts"]
-}
\ No newline at end of file
+}