-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Fix eslint errors by selectively enabling vue parser #20113
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,9 @@ | |
-d '{"context": "test/context", "description": "description", "state": "${state}", "target_url": "http://localhost"}' | ||
--> | ||
<div> | ||
<!-- eslint-disable --> | ||
<div v-if="mergeForm.hasPendingPullRequestMerge" v-html="mergeForm.hasPendingPullRequestMergeTip" class="ui info message"></div> | ||
<div v-if="mergeForm.hasPendingPullRequestMerge" class="ui info message"> | ||
{{ mergeForm.hasPendingPullRequestMergeTip }} | ||
</div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Template code indicates this is just a string and not HTML, so There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, it isn't a plain string. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is it? Template code maps it to a translation entry:
There's not HTML there so JS should see string. In any case, the warning is right, this is pretty unnecessary There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No. It is HTML. |
||
|
||
<div class="ui form" v-if="showActionForm"> | ||
<form :action="mergeForm.baseLink+'/merge'" method="post"> | ||
|
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 would against to do these ignores.
Instead, please use
eslint-disable
accurately.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.
Some
eslint-disable
should be able to be written clearly in templates, but the author doesn't respond yet.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 wasn't able to get
eslint-disable
to properly work in vue html files. Might have something todo about the plugin setup, I'm not sure.vuejs/eslint-plugin-vue#260
TBH, the vue ecosystem seems like a housefire, I'm not really motivated to even fix these.
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.
If
housefire
means something bad (I am not a native speaker so not sure I understand it correctly), most ecosystems also seem like housefire (eg, the problem I mentioned ineslint-plugin-html
problem ...)If some problems are unfixable, maybe it's worth to vote to choose a better framework and start rewriting existing code, instead of being blocked forever.
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.
So it seems the reason these existing
<!-- /* eslint-disable */ -->
comments work is because of the vue parser that's loaded viaplugin:vue/recommended
. As soon as I disables the vue parser, the HTML file fails to parse.On the other hand, the vue parser can not deal with hashbang in the node scripts, only eslint's own parser can.