From 8fd94b297799834dda6e9686051dd97a4f68f03e Mon Sep 17 00:00:00 2001 From: Aurelio Saraiva Date: Tue, 29 Nov 2016 11:08:04 -0200 Subject: [PATCH 1/7] replace jshint to eslint --- .eslintrc.js | 17 +++----------- .jshintrc | 32 -------------------------- package.json | 1 + tests/.eslintrc.js | 5 +++++ tests/.jshintrc | 52 ------------------------------------------- tests/dummy/.jshintrc | 32 -------------------------- 6 files changed, 9 insertions(+), 130 deletions(-) delete mode 100644 .jshintrc create mode 100644 tests/.eslintrc.js delete mode 100644 tests/.jshintrc delete mode 100644 tests/dummy/.jshintrc diff --git a/.eslintrc.js b/.eslintrc.js index fb5300d..2978e35 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,24 +1,13 @@ module.exports = { + root: true, parserOptions: { ecmaVersion: 6, 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 08096ef..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, - "esnext": true, - "unused": true -} diff --git a/package.json b/package.json index da3f325..d3588d5 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "ember-cli": "2.4.1", "ember-cli-app-version": "^1.0.0", "ember-cli-dependency-checker": "^1.2.0", + "ember-cli-eslint": "2.0.0", "ember-cli-htmlbars": "^1.0.1", "ember-cli-htmlbars-inline-precompile": "^0.3.1", "ember-cli-inject-live-reload": "^1.3.1", diff --git a/tests/.eslintrc.js b/tests/.eslintrc.js new file mode 100644 index 0000000..9fc5132 --- /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 6ec0b7c..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, - "esnext": true, - "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 -} From 3ff6a23ee10d0e36d0fe20b37898b5d160a76e0e Mon Sep 17 00:00:00 2001 From: Aurelio Saraiva Date: Tue, 29 Nov 2016 11:10:30 -0200 Subject: [PATCH 2/7] adjust eslint with default Ember community --- addon/components/split-child.js | 4 ++-- addon/components/split-sash.js | 2 +- addon/components/split-view.js | 2 +- addon/templates/components/split-view.hbs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addon/components/split-child.js b/addon/components/split-child.js index e5801e2..4e163b1 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 aa80c1a..cc1bbf3 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..a066a20 100644 --- a/addon/components/split-view.js +++ b/addon/components/split-view.js @@ -234,6 +234,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) ) }} From c3244f03652c9ffe307c4e04b438dc5cc8faad4d Mon Sep 17 00:00:00 2001 From: Aurelio Saraiva Date: Tue, 29 Nov 2016 11:15:48 -0200 Subject: [PATCH 3/7] add globals module --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = { From 928a06ce9678046670e821cf68331dd3f3f51ec6 Mon Sep 17 00:00:00 2001 From: Aurelio Saraiva Date: Tue, 29 Nov 2016 11:16:03 -0200 Subject: [PATCH 4/7] removed folder and file empty --- app/styles/app.scss | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 app/styles/app.scss diff --git a/app/styles/app.scss b/app/styles/app.scss deleted file mode 100644 index e69de29..0000000 From 4436cc515b5fe81caab20b3bbdf7a96f1d48ace9 Mon Sep 17 00:00:00 2001 From: Aurelio Saraiva Date: Tue, 29 Nov 2016 11:16:23 -0200 Subject: [PATCH 5/7] adjust comment in code --- addon/components/split-view.js | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/addon/components/split-view.js b/addon/components/split-view.js index a066a20..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}} * ``` * From e6954aaf2be27631b193a8e1e1a136eb01cf9abf Mon Sep 17 00:00:00 2001 From: Aurelio Saraiva Date: Tue, 29 Nov 2016 11:24:34 -0200 Subject: [PATCH 6/7] adjust eslint --- tests/dummy/app/controllers/application.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'}) ]) }); From 9e8f7a54acbf313d45290379ad0e266e60d7f1a5 Mon Sep 17 00:00:00 2001 From: Aurelio Saraiva Date: Tue, 1 Aug 2017 09:27:20 -0300 Subject: [PATCH 7/7] fix error ci --- .eslintrc.js | 4 ++-- package.json | 2 +- tests/.eslintrc.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 2978e35..2873e2f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,12 +1,12 @@ module.exports = { root: true, parserOptions: { - ecmaVersion: 6, + ecmaVersion: 2017, sourceType: 'module' }, extends: 'eslint:recommended', env: { - 'browser': true + browser: true }, rules: { } 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 index 9fc5132..fbf2555 100644 --- a/tests/.eslintrc.js +++ b/tests/.eslintrc.js @@ -1,5 +1,5 @@ module.exports = { env: { - 'embertest': true + embertest: true } };