glint
glint copied to clipboard
Error highlight in wrong place when same substring appears on line
In this example:
import { TemplateOnlyComponent } from '@ember/component/template-only';
function options(): any {
return [];
}
export default <template>
<div class='flex flex-col container m-2 p-6'>
{{#each (options) as |option|}}{{/each}}
</div>
</template> satisfies TemplateOnlyComponent<{ Args: { thing: object } }>;
Glint is underlying the first occurrent of the string "option" in the template, when it's trying to complain about the second one (being unused).
If I pick a different name for the helper function that doesn't contain the substring "option", the error highlight moves to the correct place.