mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
chore: fix leftover eslint exceptions
This commit is contained in:
@@ -67,7 +67,6 @@ function resolveIcon(item: keyof GroupedMembers) {
|
||||
}
|
||||
|
||||
const useStyles = createStyles((theme) => ({
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
link: {
|
||||
...theme.fn.focusStyles(),
|
||||
fontWeight: 500,
|
||||
|
||||
@@ -4,7 +4,6 @@ import { useMemo } from 'react';
|
||||
import { VscListSelection, VscSymbolMethod, VscSymbolProperty } from 'react-icons/vsc';
|
||||
|
||||
const useStyles = createStyles((theme) => ({
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
link: {
|
||||
...theme.fn.focusStyles(),
|
||||
fontWeight: 500,
|
||||
|
||||
@@ -47,16 +47,13 @@ export const getStaticPaths: GetStaticPaths = async () => {
|
||||
let versions: string[] = [];
|
||||
if (process.env.NEXT_PUBLIC_LOCAL_DEV) {
|
||||
const res = await readFile(join(cwd(), '..', packageName, 'docs', 'docs.api.json'), 'utf8');
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
data = JSON.parse(res);
|
||||
} else {
|
||||
const response = await fetch(`https://docs.discordjs.dev/api/info?package=${packageName}`);
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
versions = await response.json();
|
||||
|
||||
for (const version of versions) {
|
||||
const res = await fetch(`https://docs.discordjs.dev/docs/${packageName}/${version}.api.json`);
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
data = [...data, await res.json()];
|
||||
}
|
||||
}
|
||||
@@ -142,11 +139,9 @@ export const getStaticProps: GetStaticProps = async ({ params }) => {
|
||||
let data;
|
||||
if (process.env.NEXT_PUBLIC_LOCAL_DEV) {
|
||||
const res = await readFile(join(cwd(), '..', packageName, 'docs', 'docs.api.json'), 'utf8');
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
data = JSON.parse(res);
|
||||
} else {
|
||||
const res = await fetch(`https://docs.discordjs.dev/docs/${packageName}/${branchName}.api.json`);
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
data = await res.json();
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@ export const getStaticProps: GetStaticProps = async ({ params }) => {
|
||||
|
||||
try {
|
||||
const res = await fetch(`https://docs.discordjs.dev/api/info?package=${packageName ?? 'builders'}`);
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
const data: string[] = await res.json();
|
||||
|
||||
if (!data.length) {
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
|
||||
import { ApiModel, ApiItem, type ApiPackage } from '@microsoft/api-extractor-model';
|
||||
import { TSDocConfiguration } from '@microsoft/tsdoc';
|
||||
import { TSDocConfigFile } from '@microsoft/tsdoc-config';
|
||||
@@ -11,7 +8,6 @@ export function createApiModel(data: any) {
|
||||
const tsdocConfigFile = TSDocConfigFile.loadFromObject(data.metadata.tsdocConfig);
|
||||
tsdocConfigFile.configureParser(tsdocConfiguration);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
const apiPackage = ApiItem.deserialize(data, {
|
||||
apiJsonFilename: '',
|
||||
toolPackage: data.metadata.toolPackage,
|
||||
|
||||
Reference in New Issue
Block a user