Skip to content
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

[gjs/gts parser] fix references for tags with a dot & non standard html tags #1992

Merged
merged 2 commits into from
Nov 9, 2023

Conversation

patricklx
Copy link
Contributor

@patricklx patricklx commented Nov 8, 2023

fixes #1991

@patricklx patricklx changed the title add failing test fix references for tags with a dot Nov 8, 2023
@bmish bmish added the Bug label Nov 9, 2023
@patricklx patricklx marked this pull request as ready for review November 9, 2023 08:59
@patricklx patricklx changed the title fix references for tags with a dot fix references for tags with a dot & non standard html tags Nov 9, 2023
@@ -260,6 +261,34 @@ function preprocessGlimmerTemplates(info, code) {
n.loc.start = codeLines.offsetToPosition(tpl.templateRange[0]);
n.loc.end = codeLines.offsetToPosition(tpl.templateRange[1]);
}
// split up element node into sub nodes to be able to reference tag name
// parts <Foo.Bar /> -> nodes for `Foo` and `Bar`
if (n.type === 'ElementNode') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be @glimmer/syntax responsibility?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it should, yes.
same for block params, there is no node for them

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, can you open an issue over on glimmer-vm?

Once we get that shipped, we can clean up here

@NullVoxPopuli NullVoxPopuli merged commit 59ea472 into ember-cli:master Nov 9, 2023
8 checks passed
@bmish
Copy link
Member

bmish commented Nov 9, 2023

@patricklx let's mention "gjs/gts parser" in the title of these PRs so users have the relevant context to understand which part of eslint-plugin-ember these PRs are affecting.

@patricklx patricklx changed the title fix references for tags with a dot & non standard html tags [gjs/gts parser] fix references for tags with a dot & non standard html tags Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

false positives for no-unused-vars in gjs files, when using <Component as |something|>
3 participants