Skip to main content

Function: getRemarkPluginSpecifierReferences()

function getRemarkPluginSpecifierReferences(
options: Readonly<{
configObject: Readonly<TSESTree.ObjectExpression>;
pluginsProperty: Readonly<TSESTree.Property>;
}>
): readonly Readonly<{
arrayEntry?: Readonly<{
arrayExpression: Readonly<TSESTree.ArrayExpression>;
element: Readonly<ArrayElement>;
}>;
literal: Readonly<TSESTree.StringLiteral>;
removalTarget: RemarkPluginSpecifierRemovalTarget;
}>[];

Defined in: _internal/remark-config-plugin-specifiers.ts:126

Collect statically analyzable plugin specifier string literals from a Remark plugins property.

Supports top-level string declarations, direct string array entries, and tuple entries such as ["remark-toc", { heading: "contents" }].

Parametersโ€‹

optionsโ€‹

Readonly<{ configObject: Readonly<TSESTree.ObjectExpression>; pluginsProperty: Readonly<TSESTree.Property>; }>

Config object and its plugins property.

Returnsโ€‹

readonly Readonly<{ arrayEntry?: Readonly<{ arrayExpression: Readonly<TSESTree.ArrayExpression>; element: Readonly<ArrayElement>; }>; literal: Readonly<TSESTree.StringLiteral>; removalTarget: RemarkPluginSpecifierRemovalTarget; }>[]

Collected specifier references.