-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix: lint Vue files too #772
Conversation
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 fixed the flash notification. Other than that everything seems to work as expected.
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.
Oops, updating a order doesn't seem to be working properly.
When updating an item, the total price of the order is not updated. It looks like you didn't actually add a listener for the emitted event (https://vuejs.org/guide/components/events.html#emitting-and-listening-to-events). Also, I think, in updateOrderTotal
in ActivityOrders
, you should edit the data that is passed to :items
in b-table
. So either refresh the data, or, more efficiently, store the orders as data, and edit that object.
I think I fixed the event handler in 6dd6698. The way of updating you're talking about is already done I think, using the Vue slots magic (still cannot really wrap my head around that Vue feature). |
(I still do not have a working sofia environment and at this point never will so please test) |
@guidojw how did you approach compliance with |
that should work, but I'd prefer to use camel case in the event name. That is, emit string |
I had it like that as you can see in the first commit, but then I found the other convention being used elsewhere in the codebase so changed it. |
This is out of the scope of this PR but could altogether be changed in another one. I don't know what's a good way forward with that capitalization though as most DOM event names are fully lowercase too (mouseup, mousedown, mousemove, keyup, keydown, dblclick). |
@guidojw https://vuejs.org/guide/components/events.html#emitting-and-listening-to-events have a look at this. |
…t. you must fill a v-slot in a context where you know it can be filled.
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.
It's weird how github doesn't recognize renames very well.
Except for a couple of comments, lgtm. I'll approve when my comments are resolved
@guidojw v-slots exist to allow you to swap out a piece of 'default' |
In what case? In the case of capitalisation changes, there's a git config you should set, I think it's 'ignoreCase' |
I'm referring to github showing the renamed vue files as deleted and new, instead of just moved. at least that's what it shows for me, under Files Changed |
|
I will not be updating this PR anymore, so @DrumsnChocolate or @wilco375 can one of you take it over? |
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.
@DrumsnChocolate Is there anything that still needs to happen to this PR before it can be merged? Just checked it out again and everything seems to be working.
Summary
We have the ESLint Vue plugin but weren't actually using it, this PR fixes that.
TODO:
vue/no-mutating-props
error (I have no idea how (yet)).