astro/no-set-text-directive

disallow use of set:text

  • 🔧 The --fix option on the command line can automatically fix some of the problems reported by this rule.

📖 Rule Details

This rule reports all uses of set:text directive.

The documentation says about the set:text directive as follows:

This is equivalent to just passing a variable into a template expression directly (ex: <div>{someText}</div>) and therefore this directive is not commonly used.

See Astro Documentation | Template Directives Reference > set:text.

🔧 Options

Nothing.

📚 Further Reading

🚀 Version

This rule was introduced in eslint-plugin-astro v0.2.0

🔍 Implementation



Edit this page