2π
Iβve had this issue too. I resolved it by replacing { commit, state }
with a simple underscore (_
), like so:
actions:{
handler:(_, payload) => {
// do something
}
}
This is β to my understanding β a "meta-convention" used by human beings, i.e. when a developer wants to signal to other developers that "this argument is unused" (itβs frequently used in Kotlin, for example). I was quite surprised to see that my linter skipped the warnings for this notation and that my unit tests passed too.
With that being said, I think we need a bit more discussion on why this is so and whether itβs a doumented feature of the language or just plain luck, or, even worse: a nasty lint konfiguration in my project.
- [Vuejs]-How to prevent event propagation to the parent element? @input.stop doesn't work. (NuxtJS)
- [Vuejs]-Is there a method to update a data object from vue when the database updates?
1π
Iβve run into this problem also, this link might be helpful. https://forum.kirupa.com/t/js-tip-of-the-day-the-underscore-convention/643076
I ended up doing this to stop the linter from complaining:
actions:{
handler:(_context, payload) => {
// do something
}
}