kothic / kothic-js

Kothic JS — a full-featured JavaScript map rendering engine using HTML5 Canvas
http://kothic.org
BSD 2-Clause "Simplified" License
451 stars 46 forks source link

updated files to pass curly and bitwise tests in jshint #64

Open iticus opened 8 years ago

iticus commented 8 years ago

I tried to build the project using the instructions provided (by using grunt more specifically) but I got errors such as [L152:C17] W116: Expected '{' and instead saw 'continue' I fixed the code to conform with JSHint's curly option (by adding curly braces even when the block consists of only one statement) and bitwise option (by adding /*jslint bitwise: true */). Using these modifications I'm able to build the project successfully.

mourner commented 8 years ago

Would it be easier to disable the rules in JSHint? BTW we should switch to ESLint anyway, no one uses JSHint in the JavaScript world anymore.

iticus commented 8 years ago

It would probably be easier to just disable the rules (options), however using the curly brackets makes the code less error-prone. Being more explicit about using the bitwise operators helps too in my opinion. Regarding ESLint vs JSHint I don't have an opinion yet as I don't have much experience with them.

DerDakon commented 8 years ago

Whatever we do, we should be consistent. Currently the setup says that lint thing should be fine, but it is not. So either we drop it now or we fix the code now, either is fine with me (I'm not a JS guy anyway).