Skip to content

Commit

Permalink
Fix linting errors with "npm run esfix"
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanovRoman committed Oct 22, 2016
1 parent 8efb544 commit e887d16
Show file tree
Hide file tree
Showing 29 changed files with 128 additions and 128 deletions.
10 changes: 5 additions & 5 deletions src/app-router.js
Expand Up @@ -17,11 +17,11 @@
//
// You can also add standard routes to an AppRouter.

import Backbone from 'backbone';
import _ from 'underscore';
import { triggerMethod } from './common/trigger-method';
import MarionetteError from './error';
import CommonMixin from './mixins/common';
import Backbone from 'backbone';
import _ from 'underscore';
import { triggerMethod } from './common/trigger-method';
import MarionetteError from './error';
import CommonMixin from './mixins/common';

const ClassOptions = [
'appRoutes',
Expand Down
44 changes: 22 additions & 22 deletions src/backbone.marionette.js
@@ -1,15 +1,15 @@
import Backbone from 'backbone';
import {version} from '../package.json';
import Backbone from 'backbone';
import {version} from '../package.json';

import proxy from './utils/proxy';
import extend from './utils/extend';
import deprecate from './utils/deprecate';
import proxy from './utils/proxy';
import extend from './utils/extend';
import deprecate from './utils/deprecate';

import isNodeAttached from './common/is-node-attached';
import mergeOptions from './common/merge-options';
import getOption from './common/get-option';
import normalizeMethods from './common/normalize-methods';
import monitorViewEvents from './common/monitor-view-events';
import isNodeAttached from './common/is-node-attached';
import mergeOptions from './common/merge-options';
import getOption from './common/get-option';
import normalizeMethods from './common/normalize-methods';
import monitorViewEvents from './common/monitor-view-events';

import {
bindEvents,
Expand All @@ -27,19 +27,19 @@ import {
} from './common/trigger-method';


import MarionetteObject from './object';
import TemplateCache from './template-cache';
import View from './view';
import CollectionView from './collection-view';
import CompositeView from './composite-view';
import Behavior from './behavior';
import Region from './region';
import Application from './application';
import AppRouter from './app-router';
import MarionetteError from './error';
import MarionetteObject from './object';
import TemplateCache from './template-cache';
import View from './view';
import CollectionView from './collection-view';
import CompositeView from './composite-view';
import Behavior from './behavior';
import Region from './region';
import Application from './application';
import AppRouter from './app-router';
import MarionetteError from './error';

import behaviorsLookup from './config/behaviors-lookup';
import Renderer from './config/renderer';
import behaviorsLookup from './config/behaviors-lookup';
import Renderer from './config/renderer';

import {
FEATURES,
Expand Down
10 changes: 5 additions & 5 deletions src/behavior.js
Expand Up @@ -6,12 +6,12 @@
// Behaviors allow you to blackbox View specific interactions
// into portable logical chunks, keeping your views simple and your code DRY.

import _ from 'underscore';
import _ from 'underscore';
import getUniqueEventName from './utils/get-unique-event-name';
import MarionetteObject from './object';
import DelegateEntityEventsMixin from './mixins/delegate-entity-events';
import TriggersMixin from './mixins/triggers';
import UIMixin from './mixins/ui';
import MarionetteObject from './object';
import DelegateEntityEventsMixin from './mixins/delegate-entity-events';
import TriggersMixin from './mixins/triggers';
import UIMixin from './mixins/ui';

const ClassOptions = [
'collectionEvents',
Expand Down
12 changes: 6 additions & 6 deletions src/collection-view.js
@@ -1,15 +1,15 @@
// Collection View
// ---------------

import _ from 'underscore';
import Backbone from 'backbone';
import _ from 'underscore';
import Backbone from 'backbone';
import destroyBackboneView from './utils/destroy-backbone-view';
import isNodeAttached from './common/is-node-attached';
import monitorViewEvents from './common/monitor-view-events';
import isNodeAttached from './common/is-node-attached';
import monitorViewEvents from './common/monitor-view-events';
import { triggerMethodOn } from './common/trigger-method';
import ChildViewContainer from './child-view-container';
import MarionetteError from './error';
import ViewMixin from './mixins/view';
import MarionetteError from './error';
import ViewMixin from './mixins/view';

const ClassOptions = [
'behaviors',
Expand Down
2 changes: 1 addition & 1 deletion src/common/bind-events.js
Expand Up @@ -13,7 +13,7 @@
// configuration. Multiple handlers can be separated by a space. A
// function can be supplied instead of a string handler name.

import _ from 'underscore';
import _ from 'underscore';
import MarionetteError from '../error';

// Bind/unbind the event to handlers specified as a string of
Expand Down
2 changes: 1 addition & 1 deletion src/common/trigger-method.js
@@ -1,7 +1,7 @@
// Trigger Method
// --------------

import _ from 'underscore';
import _ from 'underscore';
import getOption from './get-option';

// split the event name on the ":"
Expand Down
8 changes: 4 additions & 4 deletions src/composite-view.js
@@ -1,11 +1,11 @@
// Composite View
// --------------

import _ from 'underscore';
import deprecate from './utils/deprecate';
import _ from 'underscore';
import deprecate from './utils/deprecate';
import MarionetteError from './error';
import CollectionView from './collection-view';
import View from './view';
import CollectionView from './collection-view';
import View from './view';

const ClassOptions = [
'childViewContainer',
Expand Down
2 changes: 1 addition & 1 deletion src/config/behaviors-lookup.js
@@ -1,4 +1,4 @@
import MarionetteError from '../error';
import MarionetteError from '../error';

// Placeholder method to be extended by the user.
// The method should define the object that stores the behaviors.
Expand Down
4 changes: 2 additions & 2 deletions src/config/renderer.js
@@ -1,9 +1,9 @@
// Renderer
// --------

import _ from 'underscore';
import _ from 'underscore';
import MarionetteError from '../error';
import TemplateCache from '../template-cache';
import TemplateCache from '../template-cache';

// Render a template with data by passing in the template
// selector and the data to render.
Expand Down
2 changes: 1 addition & 1 deletion src/error.js
@@ -1,7 +1,7 @@
// Error
// -----

import _ from 'underscore';
import _ from 'underscore';
import extend from './utils/extend';
import {version} from '../package.json';

Expand Down
8 changes: 4 additions & 4 deletions src/mixins/behaviors.js
@@ -1,7 +1,7 @@
import _ from 'underscore';
import _invoke from '../utils/invoke';
import { triggerMethod } from '../common/trigger-method';
import Marionette from '../backbone.marionette';
import _ from 'underscore';
import _invoke from '../utils/invoke';
import { triggerMethod } from '../common/trigger-method';
import Marionette from '../backbone.marionette';

// MixinOptions
// - behaviors
Expand Down
10 changes: 5 additions & 5 deletions src/mixins/common.js
@@ -1,11 +1,11 @@
import _setOptions from '../utils/set-options';
import getOption from '../common/get-option';
import mergeOptions from '../common/merge-options';
import normalizeMethods from '../common/normalize-methods';
import _setOptions from '../utils/set-options';
import getOption from '../common/get-option';
import mergeOptions from '../common/merge-options';
import normalizeMethods from '../common/normalize-methods';
import {
bindEvents,
unbindEvents
} from '../common/bind-events';
} from '../common/bind-events';

export default {

Expand Down
2 changes: 1 addition & 1 deletion src/mixins/regions.js
Expand Up @@ -15,7 +15,7 @@ export default {
_initRegions() {

// init regions hash
this.regions = this.regions || {};
this.regions = this.regions || {};
this._regions = {};

this.addRegions(_.result(this, 'regions'));
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/view.js
Expand Up @@ -248,6 +248,6 @@ const ViewMixin = {
}
};

_.extend(ViewMixin, BehaviorsMixin, CommonMixin, DelegateEntityEventsMixin, TriggersMixin, UIMixin);
_.extend(ViewMixin, BehaviorsMixin, CommonMixin, DelegateEntityEventsMixin, TriggersMixin, UIMixin);

export default ViewMixin;
4 changes: 2 additions & 2 deletions src/template-cache.js
@@ -1,8 +1,8 @@
// Template Cache
// --------------

import _ from 'underscore';
import Backbone from 'backbone';
import _ from 'underscore';
import Backbone from 'backbone';
import MarionetteError from './error';

// Manage templates stored in `<script>` blocks,
Expand Down
14 changes: 7 additions & 7 deletions src/view.js
@@ -1,13 +1,13 @@
// View
// ---------

import _ from 'underscore';
import Backbone from 'backbone';
import isNodeAttached from './common/is-node-attached';
import monitorViewEvents from './common/monitor-view-events';
import ViewMixin from './mixins/view';
import RegionsMixin from './mixins/regions';
import Renderer from './config/renderer';
import _ from 'underscore';
import Backbone from 'backbone';
import isNodeAttached from './common/is-node-attached';
import monitorViewEvents from './common/monitor-view-events';
import ViewMixin from './mixins/view';
import RegionsMixin from './mixins/regions';
import Renderer from './config/renderer';

const ClassOptions = [
'behaviors',
Expand Down
2 changes: 1 addition & 1 deletion test/setup/setup.js
Expand Up @@ -40,7 +40,7 @@ module.exports = function() {
$fixtures = $('<div id="fixtures">');
$('body').append($fixtures);
this.checkProperties = checkProperties;
this.setFixtures = setFixtures;
this.setFixtures = setFixtures;
this.clearFixtures = clearFixtures;
});

Expand Down
42 changes: 21 additions & 21 deletions test/unit/behaviors.spec.js
Expand Up @@ -208,9 +208,9 @@ describe('Behaviors', function() {

describe('behavior events', function() {
beforeEach(function() {
this.fooClickStub = this.sinon.stub();
this.barClickStub = this.sinon.stub();
this.bazClickStub = this.sinon.stub();
this.fooClickStub = this.sinon.stub();
this.barClickStub = this.sinon.stub();
this.bazClickStub = this.sinon.stub();
this.viewClickStub = this.sinon.stub();

this.behaviors = {
Expand Down Expand Up @@ -264,7 +264,7 @@ describe('Behaviors', function() {
})
};

this.model = new Backbone.Model();
this.model = new Backbone.Model();
this.collection = new Backbone.Collection();

this.View = Marionette.View.extend({
Expand Down Expand Up @@ -328,12 +328,12 @@ describe('Behaviors', function() {
describe('behavior UI', function() {
beforeEach(function() {
var suite = this;
this.onRenderStub = this.sinon.stub();
this.onRenderStub = this.sinon.stub();
this.onBeforeAttachStub = this.sinon.stub();
this.onAttachStub = this.sinon.stub();
this.onDestroyStub = this.sinon.stub();
this.onFooClickStub = this.sinon.stub();
this.onBarClickStub = this.sinon.stub();
this.onAttachStub = this.sinon.stub();
this.onDestroyStub = this.sinon.stub();
this.onFooClickStub = this.sinon.stub();
this.onBarClickStub = this.sinon.stub();

this.behaviors = {
foo: Marionette.Behavior.extend({
Expand Down Expand Up @@ -370,7 +370,7 @@ describe('Behaviors', function() {
childView: this.View
});

this.collection = new Backbone.Collection([{}]);
this.collection = new Backbone.Collection([{}]);
this.collectionView = new CollectionView({collection: this.collection});

this.setFixtures('<div id="region"></div>');
Expand Down Expand Up @@ -589,9 +589,9 @@ describe('Behaviors', function() {
describe('behavior model events', function() {
beforeEach(function() {
var suite = this;
this.handleModelChangeStub = this.sinon.stub();
this.handleModelChangeStub = this.sinon.stub();
this.handleCollectionResetStub = this.sinon.stub();
this.handleModelFooChangeStub = this.sinon.stub();
this.handleModelFooChangeStub = this.sinon.stub();

this.behaviors = {
foo: Marionette.Behavior.extend({
Expand Down Expand Up @@ -736,15 +736,15 @@ describe('Behaviors', function() {
beforeEach(function() {
var suite = this;

this.initializeStub = this.sinon.stub();
this.viewOnRenderStub = this.sinon.stub();
this.fooClickStub = this.sinon.stub();
this.barOnRenderStub = this.sinon.stub();
this.barClickStub = this.sinon.stub();
this.barModelChangeStub = this.sinon.stub();
this.initializeStub = this.sinon.stub();
this.viewOnRenderStub = this.sinon.stub();
this.fooClickStub = this.sinon.stub();
this.barOnRenderStub = this.sinon.stub();
this.barClickStub = this.sinon.stub();
this.barModelChangeStub = this.sinon.stub();
this.barCollectionSyncStub = this.sinon.stub();
this.viewOnRenderStub = this.sinon.stub();
this.bazClickStub = this.sinon.stub();
this.viewOnRenderStub = this.sinon.stub();
this.bazClickStub = this.sinon.stub();

this.behaviors = {
foo: Marionette.Behavior.extend({
Expand Down Expand Up @@ -786,7 +786,7 @@ describe('Behaviors', function() {
}
});

this.model = new Backbone.Model();
this.model = new Backbone.Model();
this.collection = new Backbone.Collection();

this.view = new this.View({
Expand Down
4 changes: 2 additions & 2 deletions test/unit/bind-events.spec.js
Expand Up @@ -4,8 +4,8 @@ describe('Marionette.bindEntityEvents', function() {
beforeEach(function() {
this.handleFooStub = this.sinon.stub();
this.handleBarStub = this.sinon.stub();
this.listenToStub = this.sinon.stub();
this.entityStub = this.sinon.stub();
this.listenToStub = this.sinon.stub();
this.entityStub = this.sinon.stub();

this.target = {
handleFoo: this.handleFooStub,
Expand Down
8 changes: 4 additions & 4 deletions test/unit/collection-view.spec.js
Expand Up @@ -1537,8 +1537,8 @@ describe('collection view', function() {
describe('when a collection view is not rendered', function() {
beforeEach(function() {
var suite = this;
this.Model = Backbone.Model.extend({});
this.Collection = Backbone.Collection.extend({model: this.Model});
this.Model = Backbone.Model.extend({});
this.Collection = Backbone.Collection.extend({model: this.Model});
this.CollectionView = this.CollectionView.extend({
tagName: 'ul'
});
Expand All @@ -1559,8 +1559,8 @@ describe('collection view', function() {
suite.collection.trigger('sync');
};

this.model1 = new this.Model({monkey: 'island'});
this.model2 = new this.Model({lechuck: 'tours'});
this.model1 = new this.Model({monkey: 'island'});
this.model2 = new this.Model({lechuck: 'tours'});
this.collection = new this.Collection([this.model1]);

this.collectionView = new this.CollectionView({
Expand Down

0 comments on commit e887d16

Please sign in to comment.