-
-
Notifications
You must be signed in to change notification settings - Fork 204
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
Add template block comment eslint directives #1971
Conversation
e329f03
to
fa12979
Compare
lib/parsers/gjs-gts-parser.js
Outdated
const idx = parentBody.indexOf(comment); | ||
parentBody.splice(idx, 1); | ||
// comment type can be a block comment or a line comment | ||
// block comments start with <!--- or {{!--, line comments with <!-- or {{! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{{!}} Are also block comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how so? {{!
only comments out 1 line. edit: ah it can also do multine, right. anyway, just need 2 different syntaxes
i just need to distinguish it because eslint handles those differently.
html comments has issues... glimmerjs/glimmer-vm#1487
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
html comments has issues
Yeah, i saw that. Mourd be good to fix.
I'm almost done with getting the upgrade in ember figured out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw,
<!---
multi line
--->
did not make it into the output
lib/parsers/gjs-gts-parser.js
Outdated
parentBody.splice(idx, 1); | ||
// comment type can be a block comment or a line comment | ||
// block comments start with <!--- or {{!--, line comments with <!-- or {{! | ||
comment.type = /^({{!--|<!---)/.test(code.slice(...comment.range)) ? 'Block' : 'Line'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment.type = /^({{!--|<!---)/.test(code.slice(...comment.range)) ? 'Block' : 'Line'; | |
comment.type = /^({{!|<!--)/.test(code.slice(...comment.range)) ? 'Block' : 'Line'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i found out that block comment works for eslint in all cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yay!
34d65d5
to
1824b52
Compare
1824b52
to
1a261e2
Compare
No description provided.