astro/no-exports-from-components

disallow value export

📖 Rule Details

This rule reports value exports from Astro components. The use of typed exports are still allowed.

However, there are exceptions for specific named exports that are allowed:

  • getStaticPaths: This function can be exported for dynamic routing purposes.
  • prerender: This constant can be exported to opt-in to pre-rendering in server mode.

🔧 Options

Nothing.

🚀 Version

This rule was introduced in eslint-plugin-astro v1.1.0

🔍 Implementation



Edit this page