JS HINT is seeing these issues with better_exposed_filters.js

modules/contrib/better_exposed_filters/better_exposed_filters.js Failed!

7: Missing "use strict" statement.
19: Missing semicolon.
25: Expected '===' and instead saw '=='.
69: Expected '===' and instead saw '=='.
111: Bad line breaking before '?'.
112: Expected an assignment or function call and instead saw an expression.
7: 'Drupal' is not defined.
15: 'Drupal' is not defined.
16: 'Drupal' is not defined.
86: 'Drupal' is not defined.
88: 'Drupal' is not defined.
90: 'Drupal' is not defined.
109: '$elem' is not defined.
110: '$elem' is not defined.
111: '$elem' is not defined.
112: '$elem' is not defined.
115: 'jQuery' is not defined.
62: 'index' is defined but never used.

Comments

mikeker’s picture

Status: Active » Needs work

There are a couple of valid warnings in there, but it would be good to run this against the latest -dev release so we have correct line numbers to work with. And patches are always welcome!

I'll take a look at running JSHint against BEF's JS files in the near future. But if anyone beats me to it, please post your patch/results here!

Thanks.

mikeker’s picture

Also, I'm not sure what's up with the "Expected '===', saw '=='" errors. JS is loosely-typed and sometimes that's a good thing so all those are valid comparisons. Can you explain why it would be better to use a strict comparison instead?

Thanks.

mgifford’s picture

NP. There were a lot of errors that JSHint was complaining about. I'm not a JS guy though so just wanted to report them.

Thanks for taking it on. Sorry I didn't try against the latest dev release.

Neslee Canil Pinto’s picture

Status: Needs work » Closed (won't fix)

Hi, there will be no more future development for 7.x branch. If you see this issue in 8.x, feel free to file an issue. Closing this as Closed(wont fix).