# san/valid-s-for

enforce valid s-for directives

  • ⚙️ This rule is included in all of "plugin:san/essential", "plugin:san/strongly-recommended" and "plugin:san/recommended".

This rule checks whether every s-for directive is valid.

# 📖 Rule Details

This rule reports s-for directives in the following cases:

  • The directive does not have that attribute value. E.g. <div s-for></div>
<template> <!-- ✓ GOOD --> <div s-for="todo in todos"/> <!-- ✗ BAD --> <div s-for/> </template>
Now loading...

Note

This rule does not check syntax errors in directives. san/no-parsing-error rule reports it. The following cases are syntax errors:

  • The directive's value isn't alias in expr. E.g. <div s-for="foo"></div>
  • The alias isn't LHS. E.g. <div s-for="foo() in list"></div>

# 🔧 Options

Nothing.

# 🔍 Implementation

Last Updated: 10/26/2021, 7:23:11 AM