ember-cli / ember-template-imports

Template import support in Ember!
MIT License
74 stars 39 forks source link

Eslint integration #19

Closed josemarluedke closed 1 week ago

josemarluedke commented 3 years ago

Today if we use the hbs strategy, we get eslint issues due to unused variables. The glimmerx project has a eslint-plugin that solves this issue. Should we extend that project to account for ember-template-imports or should we create a new project specifically for this project?

The changes in glimmerx is minimal,

from this: https://github.com/glimmerjs/glimmer-experimental/blob/master/packages/%40glimmerx/eslint-plugin/lib/rules/template-vars.js#L47-L49

to this:

        if (isGlimmerSfc || (node.parent.source.value !== '@glimmerx/component' && node.parent.source.value !== 'ember-template-imports')) {
          return;
        }
chriskrycho commented 3 years ago

@pzuraq I believe you had ESLint stuff working with this at one point?

NullVoxPopuli commented 2 years ago

I have this implemented here: https://github.com/ember-cli/eslint-plugin-ember/pull/1395

NullVoxPopuli commented 1 week ago

gonna close -- this has shipped in ember-cli@beta rn