Reduction of linter issues#158
Conversation
This has the advantage that IDEs (that support it) apply the linter rules.
I want to look at the consequences.
FILTER_REGEX_EXCLUDE does the job
To ignore "week,-month.md" which has two very similar tables.
This method caused two linter errors.
It is not used in this method.
This is for the files CALEXT2_View.js and CALEXT2_Event.js. I don't have any other approach to resolve this.
|
hm, something goes wrong on my end - there is only one singular event sent out by the node_helper, so my calendars on the mirror are empty. I inserted a To verify this problem is localized to this branch I checked out main again, and the problem is immediately gone. I'm gonna dig a bit deeper to see what I can find. |
|
okay, next step was a simple one: I forcefully disabled event deduplication in L248 ( inserting a |
|
found it: reverting 524a786 is the solution. The inside of that Replacing this loop with a closure means the closure will return instead of With this behaviour the return value of This then causes the final deduplication to consider all events as duplicates, reducing all calendars to the first event it finds. |
The docs don't particularly recommend one approach there. |
We don't have a better appoach (#158).
Okay, done 🙂 |
|
I'm thoroughly impressed - you brought us down to only 4 distinct errors. The dangerous evals are all required to interpret what the user configured, possibly as text - so another case to neuter the linter for a line ;) The stacked ternary could be a ev.isCancelled = item.hasOwnProperty("component") && item.component.getFirstPropertyValue("status") != null && item.component.getFirstPropertyValue("status").toUpperCase() === "CANCELLED";or am I missing a finer point? (does js short-circuit that way?) |
Looks good!
I disabled the linter rule. So, one last problem to take care of... 🚀 I don't understand the method completely yet, but I tried to solve it with this: 83c997e |
For that one I probably will have to take a look at the config file processing superlinter does for the .yamllint. looks to me like a bug in superlinter
That one seems a bit strange, but this bug report points a bit towards our trigger configuration for superlinter. I'm going to update my checkout of this branch and see if everything is peachy |
Each day has created a new timelineSleeve with month view. This was not the case before linting.
Totally overlooked that comment. My understanding of that function is that it allows you to build custom notifications inside CX2 and call them from other modules. But that's is just a rough guess, and I cannot imagine a use case for it. |
|
I've run this branch in production for 5 days straight, and I haven't seen any issue. So if you, @KristjanESPERANTO, feel good about it I'd suggest to merge this! |
|
Looks like the last kind of error message only happens for the pull request event trigger. The Superlinter run against main was flawless and did not contain that error message about calling the GitHub API. Thanks for merging at this huge amount of work! It's greatly appreciated! |
|
Thank you for your cooperation. I have learned a few things in the process 🙂 Then I suggest that we ignore the two messages for now and see if they occur again in the future. |
I got rid of a bunch of linter issues. I don't have any problems with my mirror, but I also have a very simple configuration. Please test 🙂