refactor: use eslint-config-neon for packages. (#8579)

Co-authored-by: Noel <buechler.noel@outlook.com>
This commit is contained in:
Suneet Tipirneni
2022-09-01 14:50:16 -04:00
committed by GitHub
parent 4bdb0593ae
commit edadb9fe5d
219 changed files with 2608 additions and 2053 deletions

View File

@@ -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;
}

View File

@@ -1 +1 @@
export * from './generateIndex';
export * from './generateIndex.js';