Skip to content

Latest commit

 

History

History
60 lines (42 loc) · 1.14 KB

File metadata and controls

60 lines (42 loc) · 1.14 KB

ember/template-no-log

💼 This rule is enabled in the 📋 template-lint-migration config.

Disallows usage of {{log}} in templates.

The {{log}} helper is useful for debugging but should not be present in production code. Use proper logging libraries or console statements in JavaScript code instead.

Rule Details

This rule disallows the use of {{log}} statements in templates.

Examples

Examples of incorrect code for this rule:

<template>
  {{log "debug message"}}
  <div>Content</div>
</template>
<template>
  {{#if condition}}
    {{log this.value}}
  {{/if}}
</template>

Examples of correct code for this rule:

<template>
  <div>Content</div>
</template>
<template>
  {{this.log}}
</template>
<template>
  {{logger "info"}}
</template>

Related Rules

References