Closed jhyman2 closed 3 years ago
Thanks a lot for the detailed report. That made it super easy to fix it. I really appreciate it!
This is fixed in this commit (465df2b85ca15c4d35459f4c5cceecdc9c15ab0d) and published as v7.2.2.
As a side note: I assume your code looks something like this:
const SharedFeature = Template.SharedFeatures;
Template.SharedFeatures = {
EVENT_HANDLERS: {
'click .some-classname': function (e, tmpl) {
//
},
},
}
Template.foo.events({ ...SharedFeatures.EVENT_HANDLERS })
Note that the handlers defined in SharedFeatures.EVENT_HANDLERS
won't be checked by the eventmap-params
rule as it's too hard to resolve the value properly.
As a side note: I assume your code looks something like this:
const SharedFeature = Template.SharedFeatures; Template.SharedFeatures = { EVENT_HANDLERS: { 'click .some-classname': function (e, tmpl) { // }, }, } Template.foo.events({ ...SharedFeatures.EVENT_HANDLERS })
Note that the handlers defined in
SharedFeatures.EVENT_HANDLERS
won't be checked by theeventmap-params
rule as it's too hard to resolve the value properly.
@dferber90 wow thank you! And yes, that is exactly what my code looked like. I'm happy that my report was thorough enough to help. Thank you so much for the quick fix.
If this problem happens to still arise or come back in the future, I did find a semi-elegant workaround.
const SharedFeatures = Template.SharedFeatures;
const otherFeatures = {
'click .some-classname': function (e, tmpl) {
//
}
};
const allFeatures = { ...SharedFeatures, ...otherFeatures };
Template.foo.events(allFeatures);
Hello kind eslint-plugin-meteor folks,
I love this plugin, but I have recently encountered an issue that I'd love to help fix if I can. I am using Meteor, and I am using eslint. I am consolidating our eslint config files into one, and I just tried running eslint via the CLI. I ran into an eslint crash that I cannot figure out how to fix. If you'd like, I can dig into this and try to submit a PR.
My codebase has millions of lines of code, and this is the only line in the entire codebase that is crashing. If I remove it, then eslint runs successfully and I find out I have 74266 problems (68248 errors, 6018 warnings).
The line that is crashing is this:
...SharedFeatures.EVENT_HANDLERS
.The object that it's referencing is defined like this
This line doesn't seem to have anything unusual that the rest of the codebase doesn't have. I can't share too much because of proprietary information.
Thank you for all your hard work you put into this plugin!
Here is the debug output: