Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
While writing the patch for #1460022: Prefix all jQuery variables with $ I came across some unused variable declarations that should be removed.
Comments
Comment #1
Jelle_SAdding tag
Comment #2
nod_Already in the JS component :) I added this one to the clean-up meta issue.
Comment #3
Jelle_SI was thinking... since we are jshinting everything anyway. Can't we just set the "unused" property in the configuration? That would take care of everything...
(Might be a 'problem' for all the jshinted files that were already committed?)
Comment #4
nod_oh yeah, haven't noticed this config option. Looks like a new option actually, my jshint don't recognize it. Sure, update the jshint issue with the details and we'll get to this one once the rest of the files are taken care of.
Comment #5
nod_Actually, i'm changing my point of view on this.
Having useless parameter can help contrib when they copy/paste (let's be honest happens all the time). So it's like documentation. And I'm pretty sure whatever we use to minify will get rid of them.
Also it'd mean a lot of changes to JS files. Already hard enough to get anything done in JS :)
Feel free to reopen if you want to discuss some more.