mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
refactor: use eslint-config-neon for packages. (#8579)
Co-authored-by: Noel <buechler.noel@outlook.com>
This commit is contained in:
@@ -51,14 +51,9 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^16.11.56",
|
||||
"@typescript-eslint/eslint-plugin": "^5.36.1",
|
||||
"@typescript-eslint/parser": "^5.36.1",
|
||||
"@vitest/coverage-c8": "^0.22.1",
|
||||
"eslint": "^8.23.0",
|
||||
"eslint-config-marine": "^9.4.1",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-import-resolver-typescript": "^3.5.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-config-neon": "^0.1.23",
|
||||
"prettier": "^2.7.1",
|
||||
"rollup-plugin-typescript2": "^0.33.0",
|
||||
"typescript": "^4.8.2",
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
import { stat, mkdir, writeFile } from 'node:fs/promises';
|
||||
import { join } from 'node:path';
|
||||
import { generatePath } from '@discordjs/api-extractor-utils';
|
||||
import { ApiDeclaredItem, ApiItem, ApiItemContainerMixin, ApiModel } from '@microsoft/api-extractor-model';
|
||||
import { DocCodeSpan, DocNode, DocNodeKind, DocParagraph, DocPlainText } from '@microsoft/tsdoc';
|
||||
import { ApiDeclaredItem, ApiItemContainerMixin, type ApiItem, type ApiModel } from '@microsoft/api-extractor-model';
|
||||
import { DocNodeKind, type DocCodeSpan, type DocNode, type DocParagraph, type DocPlainText } from '@microsoft/tsdoc';
|
||||
|
||||
export interface MemberJSON {
|
||||
name: string;
|
||||
kind: string;
|
||||
summary: string | null;
|
||||
name: string;
|
||||
path: string;
|
||||
summary: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to resolve the summary text for the given item.
|
||||
*
|
||||
* @param item - The API item to resolve the summary text for.
|
||||
*/
|
||||
function tryResolveSummaryText(item: ApiDeclaredItem): string | null {
|
||||
@@ -34,8 +35,14 @@ function tryResolveSummaryText(item: ApiDeclaredItem): string | null {
|
||||
retVal += (node as DocPlainText).text;
|
||||
break;
|
||||
case DocNodeKind.Section:
|
||||
case DocNodeKind.Paragraph:
|
||||
return (node as DocParagraph).nodes.forEach(visitTSDocNode);
|
||||
case DocNodeKind.Paragraph: {
|
||||
for (const child of (node as DocParagraph).nodes) {
|
||||
visitTSDocNode(child);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default: // We'll ignore all other nodes.
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export * from './generateIndex';
|
||||
export * from './generateIndex.js';
|
||||
|
||||
Reference in New Issue
Block a user