Generally, If you're using plugins the way they clearly shouldn't be, it's your own stupidity, not the stupidity of the plugin maker.
If you want to make it more foolproof, write the help conscisely. But there's no need to try to make everything idiotproof.
This should be correct, at least for the newer versions.
If you want, you can create a check with the parameter parser function that if the parameter is not 'true' or 'false', it will throw an error. But that's too much effort that can be put elsewhere.
Thanks.
Is the .toLowerCase() however also required or can we assume that they are always in lowercase?
It's not required. But... It won't hurt to use it. Computers differentiate between "true" and "True", while humans don't care about it, so a mistake of "True" where there should be "true" is much more likely (and much more sensible) than "hrtjhrtmoi" instead of "true" 😉
Boolean parameters should be always lowercase unless you use the text field though.
If you have @type boolean, then the editor will present a radio button which only produces either true or false. I set up my plugins like yours, by checking equality to the string 'true'.
If they manually edit the plugins.js file and change the value to 'hrtjhrtmoi', then I think it deserves to be treated as false. I don't do toLowerCase either because even seeing 'True' means that someone edited it manually and why are they doing that?
They can still click on "Text" and change the value manually to 0 or 1 for example. But like Poryg said, this could be considered an user-error (no need to even edit the script).
I wish RMMV by default would ship with a default plugin that comes with various utilities (like a proper boolean conversion and an improved Imported variable and etc.). Because I can make it 100% idiot-proof with a method but then I have to add this method to all of my scripts, or create a core-module (which I personally hate).
Also converting parameters to bools is in my opinion something RMMV itself should be responsible for instead of us still casting everything manually. RMMV already knows that it should be a bool, so why not already cast it for us?