diff --git a/app/.jshintignore b/app/.eslintignore similarity index 100% rename from app/.jshintignore rename to app/.eslintignore diff --git a/app/.eslintrc.js b/app/.eslintrc.js new file mode 100644 index 00000000..4770e244 --- /dev/null +++ b/app/.eslintrc.js @@ -0,0 +1,36 @@ +module.exports = { + root: true, + parserOptions: { + ecmaVersion: 6, + sourceType: 'module' + }, + extends: 'eslint:recommended', + env: { + browser: true, + jquery: true, + qunit: true, + embertest: true + }, + rules: { + }, + globals: { + "$": true, + "is": true, + "_": true, + "tinymce": true, + "CodeMirror": true, + "Drop": true, + "Mousetrap": true, + "Sortable": true, + "moment": true, + "Dropzone": true, + "Tooltip": true, + "server": true, + "authenticateUser": true, + "stubAudit": true, + "stubUserNotification": true, + "userLogin": true, + "Keycloak": true, + "Intercom": true, + } +}; diff --git a/app/.gitignore b/app/.gitignore index 86fceae7..34867ca4 100644 --- a/app/.gitignore +++ b/app/.gitignore @@ -1,7 +1,8 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. +# See https://help.github.com/ignore-files/ for more about ignoring files. # compiled output /dist +/dist-prod /tmp # dependencies @@ -13,5 +14,5 @@ /connect.lock /coverage/* /libpeerconnection.log -npm-debug.log +npm-debug.log* testem.log diff --git a/app/.jshintrc b/app/.jshintrc deleted file mode 100644 index 3fc8e7c5..00000000 --- a/app/.jshintrc +++ /dev/null @@ -1,52 +0,0 @@ -{ - "predef": [ - "server", - "document", - "window", - "-Promise", - "moment", - "$", - "jQuery", - "_", - "is", - "Mousetrap", - "CodeMirror", - "Intercom", - "Materialize", - "tinymce", - "Tether", - "Tooltip", - "Drop", - "Dropzone", - "Sortable", - "datetimepicker", - "Waypoint", - "velocity", - "Keycloak" - ], - "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/app/.travis.yml b/app/.travis.yml index 66dd1076..640f5e5f 100644 --- a/app/.travis.yml +++ b/app/.travis.yml @@ -1,21 +1,22 @@ --- language: node_js node_js: - - "0.12" + - "6" sudo: false cache: directories: - - node_modules + - $HOME/.npm + - $HOME/.cache # includes bowers cache before_install: - - export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH - - "npm config set spin false" - - "npm install -g npm@^2" + - npm config set spin false + - npm install -g bower phantomjs-prebuilt + - bower --version + - phantomjs --version install: - - npm install -g bower - npm install - bower install diff --git a/app/app/components/auth-settings.js b/app/app/components/auth-settings.js index d2c8b66a..e2634b1f 100644 --- a/app/app/components/auth-settings.js +++ b/app/app/components/auth-settings.js @@ -43,8 +43,9 @@ export default Ember.Component.extend({ switch (provider) { case constants.AuthProvider.Documize: + // nothing to do break; - case constants.AuthProvider.Keycloak: + case constants.AuthProvider.Keycloak: // eslint-disable-line no-case-declarations let config = this.get('authConfig'); if (is.undefined(config) || is.null(config) || is.empty(config) ) { diff --git a/app/app/components/document/document-view.js b/app/app/components/document/document-view.js index 1ec822df..565e4f08 100644 --- a/app/app/components/document/document-view.js +++ b/app/app/components/document/document-view.js @@ -34,7 +34,7 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, { this.loadBlocks(); - Ember.run.schedule('afterRender', () => { + Ember.run.schedule('afterRender', () => { let jumpTo = "#page-" + this.get('pageId'); if (!$(jumpTo).inView()) { $(jumpTo).velocity("scroll", { duration: 250, offset: -100 }); diff --git a/app/app/components/folder/documents-list.js b/app/app/components/folder/documents-list.js index f6850fd6..ba68de9b 100644 --- a/app/app/components/folder/documents-list.js +++ b/app/app/components/folder/documents-list.js @@ -15,8 +15,8 @@ export default Ember.Component.extend({ selectedDocuments: [], emptyState: Ember.computed('documents', function() { - return this.get('documents.length') === 0; - }), + return this.get('documents.length') === 0; + }), didReceiveAttrs() { this.set('selectedDocuments', []); diff --git a/app/app/components/folder/folder-settings.js b/app/app/components/folder/folder-settings.js index 7b065f56..b0894bcf 100644 --- a/app/app/components/folder/folder-settings.js +++ b/app/app/components/folder/folder-settings.js @@ -103,7 +103,7 @@ export default Ember.Component.extend({ message = this.getDefaultInvitationMessage(); } - this.get('permissions').forEach((permission, index) => { /* jshint ignore:line */ + this.get('permissions').forEach((permission, index) => { // eslint-disable-line no-unused-vars Ember.set(permission, 'canView', $("#canView-" + permission.userId).prop('checked')); Ember.set(permission, 'canEdit', $("#canEdit-" + permission.userId).prop('checked')); }); diff --git a/app/app/components/folder/start-document.js b/app/app/components/folder/start-document.js index 4524635d..65743767 100644 --- a/app/app/components/folder/start-document.js +++ b/app/app/components/folder/start-document.js @@ -64,7 +64,7 @@ export default Ember.Component.extend(NotifierMixin, { }); this.on("error", function (x) { - console.log("Conversion failed for ", x.name, " obj ", x); // TODO proper error handling + console.log("Conversion failed for ", x.name, " obj ", x); // eslint-disable-line no-console }); this.on("queuecomplete", function () {}); diff --git a/app/app/components/layout/zone-navigation.js b/app/app/components/layout/zone-navigation.js index 5ed7f101..e144d573 100644 --- a/app/app/components/layout/zone-navigation.js +++ b/app/app/components/layout/zone-navigation.js @@ -77,7 +77,7 @@ export default Ember.Component.extend(TooltipMixin, { self.get('pinned').updateSequence(this.toArray()).then((pins) => { self.set('pins', pins); }); - } + } }); this.set('sortable', sortable); diff --git a/app/app/components/section/gemini/type-editor.js b/app/app/components/section/gemini/type-editor.js index 762236ea..ba0aec97 100644 --- a/app/app/components/section/gemini/type-editor.js +++ b/app/app/components/section/gemini/type-editor.js @@ -28,7 +28,7 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, try { config = JSON.parse(this.get('meta.config')); - } catch (e) {} + } catch (e) {} // eslint-disable-line no-empty if (is.empty(config)) { config = { @@ -57,8 +57,7 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, if (response.apikey.length > 0 && response.url.length > 0 && response.username.length > 0) { self.send('auth'); } - }, function (reason) { //jshint ignore: line - console.log(reason); + }, function (reason) { // eslint-disable-line no-unused-vars self.set('waiting', false); if (self.get('config.userId') > 0) { self.send('auth'); @@ -96,7 +95,7 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, }); }); self.set('waiting', false); - }, function (reason) { //jshint ignore: line + }, function (reason) { // eslint-disable-line no-unused-vars self.set('workspaces', []); self.set('waiting', false); }); @@ -116,7 +115,7 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, self.set('items', response); self.set('config.itemCount', response.length); self.set('waiting', false); - }, function (reason) { //jshint ignore: line + }, function (reason) { // eslint-disable-line no-unused-vars if (self.get('isDestroyed') || self.get('isDestroying')) { return; } @@ -187,7 +186,7 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, self.set('config.userId', response.BaseEntity.id); self.set('waiting', false); self.getWorkspaces(); - }, function (reason) { //jshint ignore: line + }, function (reason) { // eslint-disable-line no-unused-vars self.set('authenticated', false); self.set('user', null); self.set('config.userId', 0); diff --git a/app/app/components/section/github/type-editor.js b/app/app/components/section/github/type-editor.js index 0d3ecfb3..2c5f9a26 100644 --- a/app/app/components/section/github/type-editor.js +++ b/app/app/components/section/github/type-editor.js @@ -56,7 +56,8 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, config.showMilestones = metaConfig.showMilestones; config.showIssues = metaConfig.showIssues; config.showCommits = metaConfig.showCommits; - } catch (e) {} + } catch (e) { // eslint-disable-line no-empty + } if (_.isUndefined(config.showCommits)) { config.showCommits = true; @@ -75,24 +76,24 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, .then(function () { self.send('authStage2'); }, function (error) { //jshint ignore: line - console.log(error); + console.log(error); // eslint-disable-line no-console self.send('auth'); }); } else { if (config.userId !== self.get("session.session.authenticated.user.id")) { - console.log("github auth wrong user ID, switching"); + console.log("github auth wrong user ID, switching"); // eslint-disable-line no-console self.set('config.userId', self.get("session.session.authenticated.user.id")); } self.get('sectionService').fetch(page, "checkAuth", self.get('config')) .then(function () { self.send('authStage2'); - }, function (error) { //jshint ignore: line - console.log(error); + }, function (error) { + console.log(error); // eslint-disable-line no-console self.send('auth'); // require auth if the db token is invalid }); } - }, function (error) { //jshint ignore: line - console.log(error); + }, function (error) { + console.log(error); // eslint-disable-line no-console }); } }, @@ -163,11 +164,11 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, self.set('config.lists', lists); self.set('busy', false); - }, function (error) { //jshint ignore: line + }, function (error) { self.set('busy', false); self.set('authenticated', false); self.showNotification("Unable to fetch repositories"); - console.log(error); + console.log(error); // eslint-disable-line no-console }); }, @@ -201,11 +202,11 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, self.set('busy', false); self.set('owners', owners); self.getOwnerLists(); - }, function (error) { //jshint ignore: line + }, function (error) { self.set('busy', false); self.set('authenticated', false); self.showNotification("Unable to fetch owners"); - console.log(error); + console.log(error); // eslint-disable-line no-console }); }, @@ -253,7 +254,7 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, meta.set('rawBody', JSON.stringify(response)); self.set('busy', false); self.attrs.onAction(page, meta); - }, function (reason) { //jshint ignore: line + }, function (reason) { // eslint-disable-line no-unused-vars self.set('busy', false); self.attrs.onAction(page, meta); }); diff --git a/app/app/components/section/papertrail/type-editor.js b/app/app/components/section/papertrail/type-editor.js index 234c1dc2..2d24f9ee 100644 --- a/app/app/components/section/papertrail/type-editor.js +++ b/app/app/components/section/papertrail/type-editor.js @@ -28,7 +28,7 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, try { config = JSON.parse(this.get('meta.config')); - } catch (e) {} + } catch (e) {} // eslint-disable-line no-empty if (is.empty(config)) { config = { @@ -90,19 +90,19 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, if (is.not.undefined(group)) { Ember.set(config, 'group', group); } - }, function (reason) { //jshint ignore: line + }, function (reason) { self.set('authenticated', false); self.set('waiting', false); self.set('config.APIToken', ''); // clear the api token self.displayError(reason); - console.log("get options call failed"); + console.log("get options call failed"); // eslint-disable-line no-console }); - }, function (reason) { //jshint ignore: line + }, function (reason) { self.set('authenticated', false); self.set('waiting', false); self.set('config.APIToken', ''); // clear the api token self.displayError(reason); - console.log("auth token invalid"); + console.log("auth token invalid"); // eslint-disable-line no-console }); }, @@ -176,7 +176,7 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, self.set('waiting', false); self.attrs.onAction(page, meta); - }, function (reason) { //jshint ignore: line + }, function (reason) { // eslint-disable-line no-unused-vars self.set('authenticated', false); self.set('waiting', false); self.showNotification(`Something went wrong, try again!`); diff --git a/app/app/components/section/trello/type-editor.js b/app/app/components/section/trello/type-editor.js index 9392f020..32823561 100644 --- a/app/app/components/section/trello/type-editor.js +++ b/app/app/components/section/trello/type-editor.js @@ -43,7 +43,7 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, try { config = JSON.parse(this.get('meta.config')); - } catch (e) {} + } catch (e) {} // eslint-disable-line no-empty if (is.empty(config)) { config = { @@ -77,8 +77,8 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, Trello.deauthorize(); }); } - }, function (error) { //jshint ignore: line - console.log(error); + }, function (error) { + console.log(error); // eslint-disable-line no-console }); }, @@ -132,7 +132,7 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, self.set('busy', false); self.set('authenticated', false); self.showNotification("Unable to fetch board lists"); - console.log(error); + console.log(error); // eslint-disable-line no-console }); }, @@ -181,7 +181,7 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, Trello.members.get("me", function (user) { self.set('config.user', user); }, function (error) { - console.log(error); + console.log(error); // eslint-disable-line no-console }); self.get('sectionService').fetch(page, "boards", self.get('config')) @@ -193,14 +193,14 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, self.set('busy', false); self.set('authenticated', false); self.showNotification("Unable to fetch boards"); - console.log(error); + console.log(error); // eslint-disable-line no-console }); }, error: function (error) { self.set('busy', false); self.set('authenticated', false); self.showNotification("Unable to authenticate"); - console.log(error); + console.log(error); // eslint-disable-line no-console } }); }); @@ -233,7 +233,7 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, meta.set('rawBody', JSON.stringify(response)); self.set('busy', false); self.attrs.onAction(page, meta); - }, function (reason) { //jshint ignore: line + }, function (reason) { // eslint-disable-line no-unused-vars self.set('busy', false); self.attrs.onAction(page, meta); }); diff --git a/app/app/components/section/wysiwyg/type-editor.js b/app/app/components/section/wysiwyg/type-editor.js index 1551ccc0..e0ef9907 100644 --- a/app/app/components/section/wysiwyg/type-editor.js +++ b/app/app/components/section/wysiwyg/type-editor.js @@ -54,16 +54,16 @@ export default Ember.Component.extend({ } }, codesample_languages: [ - {text: 'HTML/XML', value: 'markup'}, - {text: 'JavaScript', value: 'javascript'}, - {text: 'CSS', value: 'css'}, - {text: 'PHP', value: 'php'}, - {text: 'Ruby', value: 'ruby'}, - {text: 'Python', value: 'python'}, - {text: 'Java', value: 'java'}, - {text: 'C', value: 'c'}, - {text: 'C#', value: 'csharp'}, - {text: 'C++', value: 'cpp'}], + {text: 'HTML/XML', value: 'markup'}, + {text: 'JavaScript', value: 'javascript'}, + {text: 'CSS', value: 'css'}, + {text: 'PHP', value: 'php'}, + {text: 'Ruby', value: 'ruby'}, + {text: 'Python', value: 'python'}, + {text: 'Java', value: 'java'}, + {text: 'C', value: 'c'}, + {text: 'C#', value: 'csharp'}, + {text: 'C++', value: 'cpp'}], extended_valid_elements: "b,i,b/strong,i/em", plugins: [ 'advlist autolink lists link image charmap print preview hr anchor pagebreak', diff --git a/app/app/components/widget-sample.js b/app/app/components/widget-sample.js index f1129cce..259348b4 100644 --- a/app/app/components/widget-sample.js +++ b/app/app/components/widget-sample.js @@ -48,7 +48,6 @@ export default Ember.Component.extend(NotifierMixin, { }, addFolder() { - console.log("adding folder!"); return true; } } diff --git a/app/app/helpers/document/file-icon.js b/app/app/helpers/document/file-icon.js index 5a022191..e642f5bc 100644 --- a/app/app/helpers/document/file-icon.js +++ b/app/app/helpers/document/file-icon.js @@ -34,11 +34,10 @@ export function documentFileIcon(params) { case "html": html = "html.png"; - break; + break; case "css": html = "css.png"; - break; - + break; case "bat": case "sh": diff --git a/app/app/pods/auth/keycloak/route.js b/app/app/pods/auth/keycloak/route.js index 05c3f995..0a6fe961 100644 --- a/app/app/pods/auth/keycloak/route.js +++ b/app/app/pods/auth/keycloak/route.js @@ -30,7 +30,6 @@ export default Ember.Route.extend({ let authConfig = this.get('appMeta.authConfig'); if (authProvider !== constants.AuthProvider.Keycloak) { - console.log('Expecting keycloak auth but found ' + authProvider); return; } diff --git a/app/app/pods/auth/sso/route.js b/app/app/pods/auth/sso/route.js index acbdc6d0..331287c9 100644 --- a/app/app/pods/auth/sso/route.js +++ b/app/app/pods/auth/sso/route.js @@ -20,7 +20,6 @@ export default Ember.Route.extend({ this.transitionTo('folders'); }, () => { this.transitionTo('auth.login'); - console.log(">>>>> Documize SSO failure"); }); }, }); diff --git a/app/app/pods/document/index/controller.js b/app/app/pods/document/index/controller.js index de8a684a..fd553e12 100644 --- a/app/app/pods/document/index/controller.js +++ b/app/app/pods/document/index/controller.js @@ -20,8 +20,8 @@ export default Ember.Controller.extend(NotifierMixin, { pages: [], toggled: false, queryParams: ['pageId', 'tab'], - pageId: '', - tab: 'index', + pageId: '', + tab: 'index', actions: { toggleSidebar() { diff --git a/app/app/pods/document/route.js b/app/app/pods/document/route.js index 54908395..c3127cda 100644 --- a/app/app/pods/document/route.js +++ b/app/app/pods/document/route.js @@ -65,8 +65,6 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, { actions: { error(error /*, transition*/ ) { - console.log(error); - if (error) { this.transitionTo('/not-found'); return false; diff --git a/app/app/pods/settings/route.js b/app/app/pods/settings/route.js index c5360d92..5500cd14 100644 --- a/app/app/pods/settings/route.js +++ b/app/app/pods/settings/route.js @@ -81,7 +81,7 @@ export default Ember.Route.extend(NotifierMixin, { folderPermissions.pushObject(u); this.get('folderService').getPermissions(model.id).then((permissions) => { - permissions.forEach((permission, index) => { /* jshint ignore:line */ + permissions.forEach((permission, index) => { // eslint-disable-line no-unused-vars var folderPermission = folderPermissions.findBy('userId', permission.get('userId')); if (is.not.undefined(folderPermission)) { Ember.setProperties(folderPermission, { diff --git a/app/app/pods/setup/controller.js b/app/app/pods/setup/controller.js index 6bfffb01..466c26a1 100644 --- a/app/app/pods/setup/controller.js +++ b/app/app/pods/setup/controller.js @@ -26,9 +26,8 @@ export default Ember.Controller.extend(NotifierMixin, { }).then(() => { var credentials = Encoding.Base64.encode(":" + this.model.email + ":" + this.model.password); window.location.href = "/auth/sso/" + encodeURIComponent(credentials); - }).catch((error) => { + }).catch((error) => { // eslint-disable-line no-unused-vars // TODO notify user of the error within the GUI - console.log("Something went wrong attempting database creation, see server log: " + error); }); } } diff --git a/app/app/routes/application.js b/app/app/routes/application.js index f5522139..b75e652f 100644 --- a/app/app/routes/application.js +++ b/app/app/routes/application.js @@ -43,8 +43,8 @@ export default Ember.Route.extend(ApplicationRouteMixin, TooltipMixin, { error(error, transition) { if (error) { - console.log(error); - console.log(transition); + console.log(error); // eslint-disable-line no-console + console.log(transition); // eslint-disable-line no-console if (netUtil.isAjaxAccessError(error)) { localStorage.clear(); diff --git a/app/app/services/app-meta.js b/app/app/services/app-meta.js index 9d70688c..4ed9dc35 100644 --- a/app/app/services/app-meta.js +++ b/app/app/services/app-meta.js @@ -43,7 +43,7 @@ export default Ember.Service.extend({ return [this.get('endpoint'), endpoint].join('/'); }, - boot(requestedUrl) { // jshint ignore:line + boot(requestedUrl) { // eslint-disable-line no-unused-vars let dbhash; if (is.not.null(document.head.querySelector("[property=dbhash]"))) { dbhash = document.head.querySelector("[property=dbhash]").content; diff --git a/app/app/services/kc-auth.js b/app/app/services/kc-auth.js index c1d6a70e..259dc97f 100644 --- a/app/app/services/kc-auth.js +++ b/app/app/services/kc-auth.js @@ -31,7 +31,6 @@ export default Ember.Service.extend({ this.get('audit').record("initialized-keycloak"); resolve(this.get('keycloak')); }).error((err) => { - console.log('Keycloak init failed', err); reject(err); }); }); @@ -55,7 +54,6 @@ export default Ember.Service.extend({ kc.loadUserProfile().success((profile) => { return resolve(profile); }).error((err) => { - console.log('Keycloak loadUserProfile failed', err); return reject(err); }); }); diff --git a/app/app/services/logger.js b/app/app/services/logger.js index ee7f68a7..0c27a8fb 100644 --- a/app/app/services/logger.js +++ b/app/app/services/logger.js @@ -13,14 +13,14 @@ import Ember from 'ember'; export default Ember.Service.extend({ action: function(entry) { - console.log(entry); + console.log(entry); // eslint-disable-line no-console }, error: function(entry) { - console.log(entry); + console.log(entry); // eslint-disable-line no-console }, info: function(entry) { - console.log(entry); + console.log(entry); // eslint-disable-line no-console } }); \ No newline at end of file diff --git a/app/lib/.jshintrc b/app/lib/.jshintrc deleted file mode 100644 index 839c191f..00000000 --- a/app/lib/.jshintrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "node": true, - "browser": false -} diff --git a/app/mirage/config.js b/app/mirage/config.js index 08dbdec9..fafdb26d 100644 --- a/app/mirage/config.js +++ b/app/mirage/config.js @@ -31,11 +31,11 @@ export default function () { this.get('/documents', function (schema, request) { let folder_id = request.queryParams.folder; - if (folder_id = "VzMuyEw_3WqiafcG") { + if (folder_id === "VzMuyEw_3WqiafcG") { return schema.db.documents.where({ folderId: folder_id }); } - if (folder_id = 'V0Vy5Uw_3QeDAMW9') { + if (folder_id === 'V0Vy5Uw_3QeDAMW9') { return null; } }); diff --git a/app/package.json b/app/package.json index d3596bb9..04e303a3 100644 --- a/app/package.json +++ b/app/package.json @@ -21,17 +21,16 @@ "devDependencies": { "broccoli-asset-rev": "^2.4.5", "ember-ajax": "^2.4.1", - "ember-cli": "2.11.1", + "ember-cli": "2.12.0", "ember-cli-app-version": "^2.0.0", "ember-cli-babel": "^5.1.7", "ember-cli-dependency-checker": "^1.3.0", + "ember-cli-eslint": "^3.0.0", "ember-cli-htmlbars": "^1.1.1", "ember-cli-htmlbars-inline-precompile": "^0.3.6", "ember-cli-inject-live-reload": "^1.4.1", - "ember-cli-jshint": "^2.0.1", "ember-cli-mirage": "^0.2.0", - "ember-cli-qunit": "^3.0.1", - "ember-cli-release": "^0.2.9", + "ember-cli-qunit": "^3.1.0", "ember-cli-sass": "5.3.1", "ember-cli-shims": "^1.0.2", "ember-cli-sri": "^2.1.0", @@ -42,8 +41,8 @@ "ember-load-initializers": "^0.6.0", "ember-resolver": "^2.0.3", "ember-simple-auth": "1.2.0", - "ember-source": "~2.11.0", - "loader.js": "^4.0.10" + "ember-source": "~2.12.0", + "loader.js": "^4.2.3" }, "ember-addon": { "paths": [ diff --git a/app/tests/.eslintrc.js b/app/tests/.eslintrc.js new file mode 100644 index 00000000..fbf25552 --- /dev/null +++ b/app/tests/.eslintrc.js @@ -0,0 +1,5 @@ +module.exports = { + env: { + embertest: true + } +}; diff --git a/app/tests/.jshintrc b/app/tests/.jshintrc deleted file mode 100644 index bc821af7..00000000 --- a/app/tests/.jshintrc +++ /dev/null @@ -1,64 +0,0 @@ -{ - "predef": [ - "server", - "document", - "window", - "location", - "setTimeout", - "$", - "-Promise", - "define", - "console", - "visit", - "exists", - "fillIn", - "click", - "keyEvent", - "triggerEvent", - "find", - "findWithAssert", - "wait", - "DS", - "andThen", - "currentURL", - "currentPath", - "currentRouteName", - "stubSession", - "stubAudit", - "pauseTest", - "userLogin", - "skip", - "waitToAppear", - "waitToAppear", - "stubUserNotification", - "is", - "authenticateUser", - "localStorage" - ], - "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/app/tests/helpers/module-for-acceptance.js b/app/tests/helpers/module-for-acceptance.js index 25084a24..dc7e5caf 100644 --- a/app/tests/helpers/module-for-acceptance.js +++ b/app/tests/helpers/module-for-acceptance.js @@ -8,19 +8,19 @@ const { RSVP: { Promise } } = Ember; export default function(name, options = {}) { module(name, { beforeEach() { - this.application = startApp(); - localStorage.setItem('folder', 'VzMuyEw_3WqiafcG'); - stubAudit(this); - stubUserNotification(this); - server.createList('folder', 2); - server.createList('user', 2); - server.createList('document', 2); - server.createList('permission', 4); - server.createList('folder-permission', 2); - server.createList('organization', 1); + this.application = startApp(); + localStorage.setItem('folder', 'VzMuyEw_3WqiafcG'); + stubAudit(this); + stubUserNotification(this); + server.createList('folder', 2); + server.createList('user', 2); + server.createList('document', 2); + server.createList('permission', 4); + server.createList('folder-permission', 2); + server.createList('organization', 1); if (options.beforeEach) { - return options.beforeEach.apply(this, arguments); + return options.beforeEach.apply(this, arguments); } },