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
Disable embedded templates handling for eol-last
rule
#2846
Disable embedded templates handling for eol-last
rule
#2846
Conversation
eol-last
rule
a7d1f77
to
66b876e
Compare
@@ -5,6 +5,10 @@ import Rule from './_base.js'; | |||
|
|||
export default class EolLast extends Rule { | |||
parseConfig(config) { | |||
if (!this.isStrictMode) { |
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.
Let's also add a note to the rule doc that this rule doesn't apply to embedded templates?
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've adapted the rule doc as well! I figured the rule doc doesn't need an explanation, as it already said files
specifically, which I made even more explicit by saying template files
instead.
66b876e
to
cc0929e
Compare
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.
Thanks!
eol-last
ruleeol-last
rule (#2846
eol-last
rule (#2846eol-last
rule
In our test suite this is the last remaining (enabled) rule that provides incorrect results in embedded templates. Enforcing a newline at the end of an embedded template doesn't make much sense to me, so disabling the rule seems the easiest solution. You could argue to set the config to
"never"
instead of disabling completely, but that requires more changes and in the end it's not what this rule is meant for (which is having a newline or not at the end of a file, rather than at the end of a template).