mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
chore: fix leftover eslint exceptions
This commit is contained in:
@@ -2,18 +2,18 @@ import { relative, resolve } from 'node:path';
|
||||
import glob from 'fast-glob';
|
||||
import isCi from 'is-ci';
|
||||
import typescript from 'rollup-plugin-typescript2';
|
||||
import { defineBuildConfig, BuildEntry } from 'unbuild';
|
||||
import { defineBuildConfig, type BuildEntry } from 'unbuild';
|
||||
|
||||
interface ConfigOptions {
|
||||
entries: (BuildEntry | string)[];
|
||||
minify: boolean;
|
||||
emitCJS: boolean;
|
||||
externals: string[];
|
||||
cjsBridge: boolean;
|
||||
sourcemap: boolean;
|
||||
declaration: boolean;
|
||||
emitCJS: boolean;
|
||||
entries: (BuildEntry | string)[];
|
||||
externals: string[];
|
||||
minify: boolean;
|
||||
preserveModules: boolean;
|
||||
preserveModulesRoot: string;
|
||||
declaration: boolean;
|
||||
sourcemap: boolean;
|
||||
typeCheck: boolean;
|
||||
}
|
||||
|
||||
@@ -31,8 +31,7 @@ export function createUnbuildConfig({
|
||||
}: Partial<ConfigOptions> = {}) {
|
||||
const files = glob
|
||||
.sync('**', { cwd: 'src' })
|
||||
.map((file) => [`${file.slice(0, -2)}cjs`, `${file.slice(0, -2)}mjs`])
|
||||
.flat();
|
||||
.flatMap((file) => [`${file.slice(0, -2)}cjs`, `${file.slice(0, -2)}mjs`]);
|
||||
|
||||
return defineBuildConfig({
|
||||
entries,
|
||||
@@ -55,7 +54,6 @@ export function createUnbuildConfig({
|
||||
hooks: {
|
||||
'rollup:options': (_, options) => {
|
||||
// @ts-expect-error: This will always be an array
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
options.output![0] = {
|
||||
// @ts-expect-error: This will always be an array
|
||||
...options.output![0],
|
||||
@@ -66,7 +64,6 @@ export function createUnbuildConfig({
|
||||
|
||||
if (emitCJS) {
|
||||
// @ts-expect-error: This will always be an array
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
options.output![1] = {
|
||||
// @ts-expect-error: This will always be an array
|
||||
...options.output![1],
|
||||
|
||||
Reference in New Issue
Block a user