Skip to content

tripleSlashReferenceValidity

Reports invalid triple-slash reference directives.

✅ This rule is included in the ts logical presets.

Triple-slash reference directives must use valid directive types and proper formatting. Only lib, no-default-lib, path, and types are valid directive attributes.

/// <reference foo="bar" />
export const value = 1;
/// <reference types />
export const value = 1;

This rule is not configurable.

If you are using tooling other than TypeScript that uses different triple-slash reference directives, this rule might not be for you.

Made with ❤️‍🔥 in Boston by Josh Goldberg and contributors.