magpie-ea / magpie-modules

the reusable front-end bits in the _magpie modules
MIT License
7 stars 1 forks source link

Use ES6 coding practices (e.g. modules, `let` and `const` instead of `var`) #45

Open x-ji opened 6 years ago

x-ji commented 6 years ago

ES6 has been out for a while and most code linting tools such as ESLint are using ES6 standards by default. Adopting its practices might help to reduce errors and organize the codebase better. For example, modules such as jQuery or lodash need to be explicitly imported in each file instead of being assumed to exist globally. Immutable variables will be declared as const instead of var, etc.

Not urgent as the current code works perfectly. Just a thought for future refactoring.