taataa / tapspace

Zoomable user interface library for web apps.
https://taataa.github.io/tapspace/
MIT License
58 stars 8 forks source link

FIX: npm run lint #141

Closed allain closed 4 years ago

allain commented 5 years ago

Fixes to make npm run lint work again.

Specifically all calls to the method hasOwnProperty have been changed to calls to Object.prototype.hasOwnProperty.

Tests appear to all still pass.

axelpale commented 5 years ago

Oh, good job! I will look into this soon.

axelpale commented 5 years ago

Looks good. Just to mention, as Object.prototype.hasOwnProperty.call(x, y) is rather verbose, I would like to see it capsulated inside a hasProb(x,y) function, defined in the beginning of files which call hasOwnProperty a lot. Just to improve readability and enforce DRY principle.

Travis has a problem regarding virtual display initiation. Your changes did not cause it but I will look into it before merging.

allain commented 5 years ago

I'd thought the same thing but didn't see heavy use of that idiom in the codebase. I can certainly have a look at making that change.

allain commented 5 years ago

For any file that uses hasOwnProperty 3 or more times I've added a hasProp function at the top.

axelpale commented 5 years ago

Great! Happy to merge as soon as I can.

axelpale commented 4 years ago

Forgive me, this took a while... better late than never :)