template-lint
template-lint copied to clipboard
Filename case-consistency rule
@dagtveit stumbled upon issue related to having two instances of the same module that was intended to be singleton:
I am trying to share a service class across nested custom elements. but the service class dosnt have the same values.
He found out that it was caused by inconsistent letter-cases
it was due to that i wrote small d in documentData in one of the imports and big D in the other one. laaaaaaaaalllalalalal hhehehehe
It reminded me, that I had made the same mistake once, and it took me also a bit time to figure out the problem. It would be nice, if the linter would detect this issue as well.
May be better to issue an warning if the case of the file name is not exactly the same as what was requested. For one, that in itself could be a problem on linux installations set up to be case sensitive.
Either way, its easier to check for this in the reworked code.