Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 942 Bytes

File metadata and controls

39 lines (26 loc) · 942 Bytes

ember/template-no-unnecessary-service-injection-argument

💼 This rule is enabled in the following configs: strict-gjs, strict-gts.

Disallows unnecessary service injection arguments when the argument matches the property name.

Rule Details

When injecting a service, the argument is unnecessary if it matches the property name.

Examples

Examples of incorrect code for this rule:

<template>
  {{service "store"}}
</template>

Examples of correct code for this rule:

<template>
  {{this.store}}
</template>
<template>
  {{service "my-custom-service"}}
</template>

References