chromeos_smart_card_connector icon indicating copy to clipboard operation
chromeos_smart_card_connector copied to clipboard

Modernize JavaScript code

Open emaxx-google opened this issue 4 years ago • 1 comments

Currently, the JavaScript code in this repository follows pretty old guidelines (in some aspects, a few-years-old one). The code doesn't conform to the current Google JavaScript Style Guide (https://google.github.io/styleguide/jsguide.html) in several aspects, most notably:

  • Instead of modules, the goog.require+goog.provide combination is used.
  • Instead of const/let, var is used.
  • Instead of JavaScript classes, functions with the @constructor annotations are used.

emaxx-google avatar Nov 11 '20 13:11 emaxx-google

Besides just cleaning up the code, fixing this will also allow us to update to recent versions of Closure Compiler and Closure Library. Currently we're blocked, since the recent versions of Closure Compiler require the usage of JS modules.

emaxx-google avatar Nov 11 '20 13:11 emaxx-google