fossasia / susi_chromebot

SUSI.AI Chrome Extension
GNU Lesser General Public License v2.1
1.54k stars 139 forks source link

Change functions to es6 arrow functions #393

Closed rupav closed 5 years ago

rupav commented 5 years ago

Fixes #170 one task.

Checklist

Short description of what this resolves:

Converted all the function in es5 to es6 fat arrow functions, in all js files. Solves the issues, first part.

@zamhaq @ms10398 @gabru-md let me know if this is how you guys wanted.

rupav commented 5 years ago

@gabru-md please review now, resolved the conflicts. cc: @zamhaq @stealthanthrax

rupav commented 5 years ago

Agreed @ms10398, that why I have written this PR solves 1 task of the issue. Since I need to keep in mind the hoisting of variables, I will convert var to let and const appropriately in the next and final PR for the same issue

ms10398 commented 5 years ago

Sure you can and check if anything can be destructured

Sometime in near future I am looking at the extension using Babel and Gulp to build it like this https://github.com/EmailThis/extension-boilerplate

or maybe port it to React

but sadly I don't have time for it right now :worried:

rupav commented 5 years ago

@gabru-md @zamhaq already made the changes for max statements to 60 in my previous PR. Refer https://github.com/fossasia/susi_chromebot/pull/387#issuecomment-426213556

gabru-md commented 5 years ago

we can iterate over it now. thanks