chore: lint
This commit is contained in:
@@ -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",
|
||||
},
|
||||
}),
|
||||
]
|
||||
|
||||
@@ -38,4 +38,4 @@ export function makeGQLRequest(x: Omit<HoppGQLRequest, "v">) {
|
||||
v: 1,
|
||||
...x,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export * from "./rest"
|
||||
export * from "./graphql"
|
||||
export * from "./graphql"
|
||||
|
||||
@@ -10,4 +10,4 @@ export const knownContentTypes = {
|
||||
"text/plain": "plain",
|
||||
}
|
||||
|
||||
export type ValidContentTypes = keyof typeof knownContentTypes
|
||||
export type ValidContentTypes = keyof typeof knownContentTypes
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
"strictNullChecks": true,
|
||||
"resolveJsonModule": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user