diff --git a/.eslintrc.js b/.eslintrc.js index fb5300d..2873e2f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,24 +1,13 @@ module.exports = { + root: true, parserOptions: { - ecmaVersion: 6, + ecmaVersion: 2017, sourceType: 'module' }, - extends: 'airbnb-base', + extends: 'eslint:recommended', env: { - 'es6': true, - 'browser': true, - 'node': true + browser: true }, rules: { - 'arrow-parens': [2, 'always'], - 'func-names': 0, - 'no-use-before-define': [2, 'nofunc'], - 'prefer-arrow-callback': 0, - 'import/no-unresolved': 0, - 'import/extensions': 0, - 'no-restricted-syntax': 0, - "import/no-extraneous-dependencies": 0, - 'no-underscore-dangle': 0, - 'no-param-reassign': [2, { "props": false }] } }; diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index d421faa..0000000 --- a/.jshintrc +++ /dev/null @@ -1,32 +0,0 @@ -{ - "predef": [ - "document", - "window", - "-Promise" - ], - "browser": true, - "boss": true, - "curly": true, - "debug": false, - "devel": true, - "eqeqeq": true, - "evil": true, - "forin": false, - "immed": false, - "laxbreak": false, - "newcap": true, - "noarg": true, - "noempty": false, - "nonew": false, - "nomen": false, - "onevar": false, - "plusplus": false, - "regexp": false, - "undef": true, - "sub": true, - "strict": false, - "white": false, - "eqnull": true, - "esversion": 6, - "unused": true -} diff --git a/addon/components/split-child.js b/addon/components/split-child.js index a23e9c0..2bee687 100644 --- a/addon/components/split-child.js +++ b/addon/components/split-child.js @@ -9,7 +9,7 @@ export default Ember.Component.extend({ classNameBindings: [ 'parent.isDragging:dragging', 'parent.isVertical:vertical:horizontal', - 'childSplitView:nested', + 'childSplitView:nested' ], childSplitView: null, @@ -174,6 +174,6 @@ export default Ember.Component.extend({ return this.minSizeHorizontal(); } - ), + ) }); diff --git a/addon/components/split-sash.js b/addon/components/split-sash.js index da121c3..54c707f 100644 --- a/addon/components/split-sash.js +++ b/addon/components/split-sash.js @@ -64,6 +64,6 @@ export default Ember.Component.extend({ mouseDown(event) { this.set('parent.isDragging', true); event.preventDefault(); - }, + } }); diff --git a/addon/components/split-view.js b/addon/components/split-view.js index f4e65be..85ac08f 100644 --- a/addon/components/split-view.js +++ b/addon/components/split-view.js @@ -1,5 +1,3 @@ -/* eslint max-len: 0 */ -/* eslint new-cap: ["error", { "capIsNew": false }]*/ import Ember from 'ember'; import SplitChild from './split-child'; import splitViewLayout from 'ember-split-view/templates/components/split-view'; @@ -16,28 +14,28 @@ const { computed, observer } = Ember; * Vertical SplitView example: * * ```handlebars - * {{#split-view isVertical=true}} - * {{#split-child}} + * {{#split-view isVertical=true as |split| }} + * {{#split.child}} * Content of the left view here. - * {{/split-child}} - * {{split-sash"}} - * {{#split-child}} + * {{/split.child}} + * {{split.sash}} + * {{#split.child}} * Content of the right view here. - * {{/split-child}} + * {{/split.child}} * {{/split-view}} * ``` * * Horizontal SplitView example: * * ```handlebars - * {{#split-view isVertical=false}} - * {{#split-child}} - * Content of the top view here. - * {{/split-child}} - * {{split-sash"}} - * {{#split-child}} - * Content of the bottom view here. - * {{/split-child}} + * {{#split-view isVertical=false as |split| }} + * {{#split.child}} + * Content of the left view here. + * {{/split.child}} + * {{split.sash}} + * {{#split.child}} + * Content of the right view here. + * {{/split.child}} * {{/split-view}} * ``` * @@ -234,6 +232,6 @@ export default Ember.Component.extend({ this.set('splitPosition', position); this.constrainSplit(); - }, + } }); diff --git a/addon/templates/components/split-view.hbs b/addon/templates/components/split-view.hbs index 7975abc..2886dd5 100644 --- a/addon/templates/components/split-view.hbs +++ b/addon/templates/components/split-view.hbs @@ -1 +1 @@ -{{yield (hash child=(component 'split-child' parent=this) sash=(component 'split-sash' parent=this) ) }} +{{yield (hash child=(component "split-child" parent=this) sash=(component "split-sash" parent=this) ) }} diff --git a/app/styles/app.scss b/app/styles/app.scss deleted file mode 100644 index e69de29..0000000 diff --git a/index.js b/index.js index 9027b06..a9233c0 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ -/* jshint node: true */ +/* globals module */ 'use strict'; module.exports = { diff --git a/package.json b/package.json index 406aaa0..ee25060 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,8 @@ "ember-cli": "2.10.0", "ember-cli-app-version": "^2.0.0", "ember-cli-dependency-checker": "^1.3.0", + "ember-cli-eslint": "4.2.0", "ember-cli-inject-live-reload": "^1.4.1", - "ember-cli-jshint": "^2.0.1", "ember-cli-qunit": "^3.0.1", "ember-cli-release": "^0.2.9", "ember-cli-sri": "^2.1.0", diff --git a/tests/.eslintrc.js b/tests/.eslintrc.js new file mode 100644 index 0000000..fbf2555 --- /dev/null +++ b/tests/.eslintrc.js @@ -0,0 +1,5 @@ +module.exports = { + env: { + embertest: true + } +}; diff --git a/tests/.jshintrc b/tests/.jshintrc deleted file mode 100644 index d2bd113..0000000 --- a/tests/.jshintrc +++ /dev/null @@ -1,52 +0,0 @@ -{ - "predef": [ - "document", - "window", - "location", - "setTimeout", - "$", - "-Promise", - "define", - "console", - "visit", - "exists", - "fillIn", - "click", - "keyEvent", - "triggerEvent", - "find", - "findWithAssert", - "wait", - "DS", - "andThen", - "currentURL", - "currentPath", - "currentRouteName" - ], - "node": false, - "browser": false, - "boss": true, - "curly": true, - "debug": false, - "devel": false, - "eqeqeq": true, - "evil": true, - "forin": false, - "immed": false, - "laxbreak": false, - "newcap": true, - "noarg": true, - "noempty": false, - "nonew": false, - "nomen": false, - "onevar": false, - "plusplus": false, - "regexp": false, - "undef": true, - "sub": true, - "strict": false, - "white": false, - "eqnull": true, - "esversion": 6, - "unused": true -} diff --git a/tests/dummy/.jshintrc b/tests/dummy/.jshintrc deleted file mode 100644 index 7547475..0000000 --- a/tests/dummy/.jshintrc +++ /dev/null @@ -1,32 +0,0 @@ -{ - "predef": { - "document": true, - "window": true, - "-Promise": true - }, - "browser" : true, - "boss" : true, - "curly": true, - "debug": false, - "devel": true, - "eqeqeq": true, - "evil": true, - "forin": false, - "immed": false, - "laxbreak": false, - "newcap": true, - "noarg": true, - "noempty": false, - "nonew": false, - "nomen": false, - "onevar": false, - "plusplus": false, - "regexp": false, - "undef": true, - "sub": true, - "strict": false, - "white": false, - "eqnull": true, - "esnext": true, - "unused": true -} diff --git a/tests/dummy/app/controllers/application.js b/tests/dummy/app/controllers/application.js index ea7cd13..702e4b3 100644 --- a/tests/dummy/app/controllers/application.js +++ b/tests/dummy/app/controllers/application.js @@ -7,6 +7,6 @@ export default Ember.Controller.extend({ Ember.Object.create({ title: "Vertical Composite", content: 'verticalComposite'}), Ember.Object.create({ title: "Horizontal Composite", content: 'horizontalComposite'}), Ember.Object.create({ title: "Composite", content: 'composite'}), - Ember.Object.create({ title: "Collapsible Panes", content: 'collapsiblePanes'}), + Ember.Object.create({ title: "Collapsible Panes", content: 'collapsiblePanes'}) ]) });