Enforce a consistent ES6 coding style

Replace the old (and broken) jshint + jscsrc by eslint and configure
it to support some of the ES6 features.

The command `eslint` currently has one error which is a bug that was
discovered by its static analysis and should be fixed (usage of a
dead object).
This commit is contained in:
Maxime Quandalle 2015-09-03 23:12:46 +02:00
parent 039cfe7edf
commit b3851817ec
60 changed files with 1604 additions and 1692 deletions

View file

@ -1,14 +1,12 @@
Mixins.PerfectScrollbar = BlazeComponent.extendComponent({
onRendered: function() {
var component = this.mixinParent();
var domElement = component.find('.js-perfect-scrollbar');
onRendered() {
const component = this.mixinParent();
const domElement = component.find('.js-perfect-scrollbar');
Ps.initialize(domElement);
// XXX We should create an event map to be consistent with other components
// but since BlazeComponent doesn't merge Mixins events transparently I
// prefered to use a jQuery event (which is what an event map ends up doing)
component.$(domElement).on('mouseenter', function() {
Ps.update(domElement);
});
}
component.$(domElement).on('mouseenter', () => Ps.update(domElement));
},
});