Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 1 KB

File metadata and controls

58 lines (41 loc) · 1 KB

ember/template-no-log

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