Prefix internal APIs with underscores (underscore-internal)

April 15, 2021 ยท View on GitHub

Ensures that APIs tagged with @internal are prefixed with underscores, as that's the convention stipulated by api-extractor:

To emphasize this, an underscore prefix should be used in the name of a declaration with an (explicit) @internal tag. API Extractor validates this naming convention and will report [ae-internal-missing-underscore](API Extractor validates this naming convention and will report ae-internal-missing-underscore if the underscore is missing) if the underscore is missing.

Rule details

Examples of incorrect code for this rule:

/**
 * @internal
 */
export function enableLogging() { /* ... */ }

Examples of correct code for this rule:

/**
 * @internal
 */
export function _enableLogging() { /* ... */ }