Repository: withastro/astro
File: packages/astro/src/core/errors/errors-data.ts (TypeScript)

Code before:
/**
 * @docs
 * @description
 * Font component is used but experimental fonts have not been registered in the config.
 */
export const ExperimentalFontsNotEnabled = {
	name: 'ExperimentalFontsNotEnabled',
	title: 'Experimental fonts are not enabled',
	message:
		'The Font component is used but experimental fonts have not been registered in the config.',
	hint: 'Check that you have enabled experimental fonts and also configured your preferred fonts.',
} satisfies ErrorData;

/**
 * @docs
 * @description
 * Font family not found
 * @message
 * No data was found for the cssVariable passed to the Font component or getFontData function.
 */
export const FontFamilyNotFound = {
	name: 'FontFamilyNotFound',
	title: 'Font family not found',
	message: (family: string) =>
		`No data was found for the \`"${family}"\` family passed to the \`<Font>\` component.`,
	hint: 'This is often caused by a typo. Check that the Font component and getFontData function are using a `cssVariable` specified in your config.',
} satisfies ErrorData;

/**
 * @docs
 * @description
 * The CSP feature isn't enabled
 * @message
 * The `experimental.csp` configuration isn't enabled.
 */
export const CspNotEnabled = {
	name: 'CspNotEnabled',
	title: "CSP feature isn't enabled",
	message: "The `experimental.csp` configuration isn't enabled.",
} satisfies ErrorData;

/**
 * @docs
 * @kind heading
 * @name CSS Errors
 */
// CSS Errors
/**
 * @docs
 * @see
 * 	- [Styles and CSS](https://docs.astro.build/en/guides/styling/)

Review comment (suggestion):
```suggestion
	hint: 'This is often caused by a typo. Check that the `<Font />` component or `getFontData()` function are using a `cssVariable` specified in your config.',
```
Nice hint!

Code after:
/**
 * @docs
 * @description
 * Font component is used but experimental fonts have not been registered in the config.
 */
export const ExperimentalFontsNotEnabled = {
	name: 'ExperimentalFontsNotEnabled',
	title: 'Experimental fonts are not enabled',
	message:
		'The Font component is used but experimental fonts have not been registered in the config.',
	hint: 'Check that you have enabled experimental fonts and also configured your preferred fonts.',
} satisfies ErrorData;

/**
 * @docs
 * @description
 * Font family not found
 * @message
 * No data was found for the `cssVariable` passed to the `<Font />` component or to the `getFontData()` function.
 */
export const FontFamilyNotFound = {
	name: 'FontFamilyNotFound',
	title: 'Font family not found',
	message: (family: string) =>
		`No data was found for the \`"${family}"\` family passed to the \`<Font>\` component.`,
	hint: 'This is often caused by a typo. Check that the `<Font />` component or `getFontData()` function are using a `cssVariable` specified in your config.',
} satisfies ErrorData;

/**
 * @docs
 * @description
 * The CSP feature isn't enabled
 * @message
 * The `experimental.csp` configuration isn't enabled.
 */
export const CspNotEnabled = {
	name: 'CspNotEnabled',
	title: "CSP feature isn't enabled",
	message: "The `experimental.csp` configuration isn't enabled.",
} satisfies ErrorData;

/**
 * @docs
 * @kind heading
 * @name CSS Errors
 */
// CSS Errors
/**
 * @docs
 * @see
 * 	- [Styles and CSS](https://docs.astro.build/en/guides/styling/)