ember-template-lint / eslint-plugin-hbs

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

Error while loading rule 'hbs/check-hbs-template-literals': configPlugins is not iterable #39

Closed EvgenyOrekhov closed 4 years ago

EvgenyOrekhov commented 4 years ago

After upgrading ember-template-lint to 2.9.0, eslint-plugin-hbs stopped working:

eslint .

Oops! Something went wrong! :(

ESLint: 7.4.0

TypeError: Error while loading rule 'hbs/check-hbs-template-literals': configPlugins is not iterable
Occurred while linting foo.js
    at processPlugins (node_modules\ember-template-lint\lib\get-config.js:161:24)
    at node_modules\ember-template-lint\lib\get-config.js:197:32
    at forEachPluginConfiguration (node_modules\ember-template-lint\lib\get-config.js:98:7)
    at processPlugins (node_modules\ember-template-lint\lib\get-config.js:195:3)
    at getProjectConfig (node_modules\ember-template-lint\lib\get-config.js:493:5)
    at Linter.loadConfig (node_modules\ember-template-lint\lib\linter.js:47:19)
    at new Linter (node_modules\ember-template-lint\lib\linter.js:39:10)
    at Object.create (node_modules\eslint-plugin-hbs\lib\rules\check-hbs-template-literals.js:65:16)
    at createRuleListeners (node_modules\eslint\lib\linter\linter.js:758:21)
    at node_modules\eslint\lib\linter\linter.js:928:31

It works fine with ember-template-lint 2.8.0.

psbanka commented 4 years ago

Thanks for the report. Will look into this!

EvgenyOrekhov commented 4 years ago

@psbanka I might've mixed up the versions. I think it was working with ember-template-lint 2.8.0 (the previous one, as of now), and stopped working with ember-template-lint 2.9.0 (the latest one, as of now).

EvgenyOrekhov commented 4 years ago

Anyways, the point is, it's not working anymore.

EvgenyOrekhov commented 4 years ago

I triple-checked it, it works with ember-template-lint 2.8.0, it doesn't work with ember-template-lint 2.9.0. I updated the issue description accordingly.

rwjblue commented 4 years ago

I think this is the same as what was reported in https://github.com/ember-template-lint/ember-template-lint/issues/1401 and is fixed (pending release) on ember-template-lint master.

EvgenyOrekhov commented 4 years ago

@rwjblue I installed it using npm install git://github.com/ember-template-lint/ember-template-lint.git#master, and I can confirm that it works. Looking forward to the next release. Thank you!

psbanka commented 4 years ago

Thanks, y'all; I'll close this issue.