ember-template-lint / eslint-plugin-hbs

Plugin for eslint which checks inline hbs templates
ISC License
18 stars 8 forks source link

ember-template-lint "overrides" config does not work with eslint-plugin-hbs #40

Open tstewart15 opened 4 years ago

tstewart15 commented 4 years ago

Duplicate of #37 since it was closed and I cannot re-open it.

jaydgruber commented 3 years ago

Yeah, this still seems to be an issue. https://github.com/ember-template-lint/ember-template-lint/pull/1495 fixed an issue with parsing the overrides. Now if I log linter.config.overrides at: https://github.com/ember-template-lint/eslint-plugin-hbs/blob/master/lib/rules/check-hbs-template-literals.js#L65, the overrides are present. But on https://github.com/ember-template-lint/eslint-plugin-hbs/blob/master/lib/rules/check-hbs-template-literals.js#L78, we are not passing the filePath that the template-linter Node API expects. So it has no way to know to apply the overrides. Looking into this to see to see if I can figure out where to grab the filepath from.

jaydgruber commented 3 years ago

Seems like if I just add filePath: context.getFilename() to the linter.verify() options on #L78, this should work. Will see if I can get a PR up w/ a test.