ember-template-lint / eslint-plugin-hbs

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

Incompatible with ember-template-lint 4.x #54

Open jamescdavis opened 2 years ago

jamescdavis commented 2 years ago

Since ember-template-lint 4.x has been converted to ESM, eslint-plugin-hbs is no longer compatible (the hbs/check-hbs-template-literals rule cannot load ember-template-lint since it is using require()):

https://github.com/ember-template-lint/eslint-plugin-hbs/blob/7cc617fb33eed7b5254ca34f103b74a3e376216a/lib/rules/check-hbs-template-literals.js#L51

Once ESLint supports async rules, it will be possible to update the rule to load ember-template-lint via:

await import('ember-template-lint')

Supporting async rules is on the ESLint 2022 Roadmap.

JounQin commented 2 years ago

For now, you can try https://github.com/un-ts/synckit

See https://github.com/mdx-js/eslint-mdx/blob/master/packages/eslint-mdx/src/worker.ts for example.