-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use content-tag
in @glint/environment-ember-template-imports
#609
Comments
content-tag
in @glint/environment-ember-template-imports
It concerns me a little that we already have multiple different libraries cropping up to handle the content tag transform, but it's definitely the case that we should use whatever standard implementation we can rather than continuing to rely on |
the JS one, it seems is more focused on having consistent line outputs and other meta, whereas the rust-based one is purely concerned with the function of the transform. Idk if the rust-based one could/should also emit that meta, but I asked about it in the eslint-plugin-ember PR, and it seems different needs were... needed. 🙃 |
The js one (ember-template-tag) has 3 main functions. |
@patricklx can it do error-tolerant parsing? one thing Glint is lacking right now is the ability to suggest args / blocks / etc while typing, when at a given mid-type the overall template is invalid syntax |
@NullVoxPopuli it's based on babel and it enables error recovery by default. But if you mean template parts, then that has nothing to do with the template detection, but an issue in glimmer parsing |
Unblocks gts in Polaris: NullVoxPopuli/polaris-starter#11 |
`ember-template-imports`. Resolves: typed-ember#609 Resolves: typed-ember#706 Resolves: typed-ember#694
ember-template-imports is an implementation detail of a feature, where those implementation details are being phased out.
For example,
ember-template-imports
is not used within the v2-addon blueprint (with rollup -- there is a rust plugin that handles the transform, per RFC: emberjs/rfcs#933), and@embroider/vite
uses that same plugin in apps, and actually breaks withember-template-imports
present (one too many transforms are happening).So, I think Glint should also use https://www.npmjs.com/package/content-tag
However, because how Glint handles<template>
is an implementation details, there is another approach as well. There is a javascript implementation of content-tag used in this PR:https://github.com/ember-cli/eslint-plugin-ember/pull/1920/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519
The text was updated successfully, but these errors were encountered: