chore: lint

This commit is contained in:
liyasthomas
2022-01-05 10:17:23 +05:30
parent dd7aebaf94
commit ffd1acdfae
10 changed files with 50 additions and 48 deletions

View File

@@ -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",
},
}),
]

View File

@@ -38,4 +38,4 @@ export function makeGQLRequest(x: Omit<HoppGQLRequest, "v">) {
v: 1,
...x,
}
}
}

View File

@@ -1,2 +1,2 @@
export * from "./rest"
export * from "./graphql"
export * from "./graphql"

View File

@@ -10,4 +10,4 @@ export const knownContentTypes = {
"text/plain": "plain",
}
export type ValidContentTypes = keyof typeof knownContentTypes
export type ValidContentTypes = keyof typeof knownContentTypes

View File

@@ -9,4 +9,4 @@
"strictNullChecks": true,
"resolveJsonModule": true
}
}
}

View File

@@ -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
export default options