# san/no-expression-in-template-literals

disallow expression in the template in template literals

  • ⚙️ This rule is included in "plugin:san/recommended".

# 📖 Rule Details

disallow expression in the template in template literals

// GOOD
export class B {
    static template = `
        <div>2</div>
    `;
}

san.defineComponent({
  template: `
      <div>1</div>
  `,
})

// BAD
san.defineComponent({
    template: `
        <div>${template}</div>
    `,
})

// @san/component
export class A {
    static template = `
        <div>${template}</div>
    `;
}

export default {
    template: `
        <div>${template}</div>
    `,
}

# 🔧 Options

nothing

# 🔍 Implementation

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