eslint is just being extra pedantic. That's not an error, but a style warning. You can safely ignore them.
The problem it's trying to prevent is when you have code like this (line 18):
if (!document.title.includes('Hubitat'))
document.title = `Hubitat - ${document.title}`;
and you need to add an extra line into the statement protected by the if clause. If you just blindly add the line, then it's a bug. It looks right because of the indentation, but it's not.
if (!document.title.includes('Hubitat'))
document.title = `Hubitat - ${document.title}`;
document.foobar = `Haha`; // BUG this line will always be executed
You avoid the bug by adding braces when you add a line:
By suggesting (forcing) you to always use braces { } to bracket the statement after the if clause, you can't accidentally introduce this bug. So if you start with this:
if (!document.title.includes('Hubitat')) {
document.title = `Hubitat - ${document.title}`;
}
Then it is easy to add a line, without needing to inspect the surrounding code.
What does the table section with Rule Machine in the Apps page look like? This code just reformats that, using the rule name up to the first space (or dash) as the "Room" grouping.
Full-bracing is a common style convention in many languages derived from C (C++, C#, Perl, Java, etc). Avoiding this sort of bug is the basis for Python, which does away with braces completely and uses the indentation to decide code flow.
Found a better place for it. Got inspired by Google home, who puts the location/hub name as the largest title when you open the app, so I put it to the top right corner:
Thanks, I don't have access to beta, but I updated header lookup. It still works in current HE version, and I think it might work in beta too. I also fixed bug when Hubitat changes page title in h5 on same pages, which overwrites "hub location" (and updated version number).
Any chance you could work your magic on the File Manager screen, to sort the files, at least in alphabetical order. An option to select alphabetical or date modified would be even nicer, but I would settle for any sense of order.
I'm traveling for about a month, so will be able to look at it only after that. Didn't get my vpn set up in time unfortunately. I though the edit rules is fixed, but if not, try to hit F5 on that page, it helped me before that fix.
I just found this post. Thanks OP, very nice changes. I created a fork which fixes the Rules menu on v2.3.4 along with a couple other improvements. I may add more in the future...
Icon on Rules page toggles the grouping originally done by the OP (value is persisted)
Rules page no longer shows non-rules
Fixed add button and added one for the basic engine as well
Tried to make it a little more robust in the places I touched.