From 1f899bec2103ade0dd40b65f986ae0ffc81cadf8 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Mon, 30 Jul 2018 11:09:08 -0400 Subject: [PATCH] DEV: prettier 1.14.0 --- .../javascripts/admin/models/admin-user.js.es6 | 9 ++++++--- .../discourse/components/backup-codes.js.es6 | 3 ++- .../discourse/components/d-navigation.js.es6 | 3 ++- .../discourse/components/group-post.js.es6 | 3 ++- .../discourse/components/topic-entrance.js.es6 | 6 ++++-- .../discourse/controllers/composer.js.es6 | 3 ++- .../javascripts/discourse/controllers/static.js.es6 | 3 ++- .../discourse/controllers/upload-selector.js.es6 | 6 ++++-- .../javascripts/discourse/models/composer.js.es6 | 6 ++++-- .../javascripts/discourse/models/nav-item.js.es6 | 3 ++- app/assets/javascripts/discourse/models/user.js.es6 | 12 ++++++++---- .../javascripts/wizard/components/staff-count.js.es6 | 3 ++- .../wizard/components/wizard-step-form.js.es6 | 3 ++- .../javascripts/wizard/components/wizard-step.js.es6 | 6 ++++-- .../javascripts/wizard/mixins/valid-state.js.es6 | 9 ++++++--- app/assets/javascripts/wizard/models/step.js.es6 | 3 ++- app/assets/javascripts/wizard/models/wizard.js.es6 | 3 ++- package.json | 2 +- yarn.lock | 6 +++--- 19 files changed, 60 insertions(+), 32 deletions(-) diff --git a/app/assets/javascripts/admin/models/admin-user.js.es6 b/app/assets/javascripts/admin/models/admin-user.js.es6 index 39a2b7ee1dd..ec230ffff48 100644 --- a/app/assets/javascripts/admin/models/admin-user.js.es6 +++ b/app/assets/javascripts/admin/models/admin-user.js.es6 @@ -530,11 +530,14 @@ const AdminUser = Discourse.User.extend({ } }, - @computed("suspended_by") suspendedBy: wrapAdmin, + @computed("suspended_by") + suspendedBy: wrapAdmin, - @computed("silenced_by") silencedBy: wrapAdmin, + @computed("silenced_by") + silencedBy: wrapAdmin, - @computed("approved_by") approvedBy: wrapAdmin + @computed("approved_by") + approvedBy: wrapAdmin }); AdminUser.reopenClass({ diff --git a/app/assets/javascripts/discourse/components/backup-codes.js.es6 b/app/assets/javascripts/discourse/components/backup-codes.js.es6 index 11457eb7369..3df4b064b98 100644 --- a/app/assets/javascripts/discourse/components/backup-codes.js.es6 +++ b/app/assets/javascripts/discourse/components/backup-codes.js.es6 @@ -31,7 +31,8 @@ export default Ember.Component.extend({ } }, - @computed("formattedBackupCodes") base64BackupCode: b64EncodeUnicode, + @computed("formattedBackupCodes") + base64BackupCode: b64EncodeUnicode, @computed("backupCodes") formattedBackupCodes(backupCodes) { diff --git a/app/assets/javascripts/discourse/components/d-navigation.js.es6 b/app/assets/javascripts/discourse/components/d-navigation.js.es6 index 0ba2a852017..dc1eee1c3c7 100644 --- a/app/assets/javascripts/discourse/components/d-navigation.js.es6 +++ b/app/assets/javascripts/discourse/components/d-navigation.js.es6 @@ -18,7 +18,8 @@ export default Ember.Component.extend({ return hasDraft ? "topic.open_draft" : "topic.create"; }, - @computed("category.can_edit") showCategoryEdit: canEdit => canEdit, + @computed("category.can_edit") + showCategoryEdit: canEdit => canEdit, @computed("filterMode", "category", "noSubcategories") navItems(filterMode, category, noSubcategories) { diff --git a/app/assets/javascripts/discourse/components/group-post.js.es6 b/app/assets/javascripts/discourse/components/group-post.js.es6 index 5a28daf92dd..f94f36dc8db 100644 --- a/app/assets/javascripts/discourse/components/group-post.js.es6 +++ b/app/assets/javascripts/discourse/components/group-post.js.es6 @@ -1,5 +1,6 @@ import computed from "ember-addons/ember-computed-decorators"; export default Ember.Component.extend({ - @computed("post.url") postUrl: Discourse.getURL + @computed("post.url") + postUrl: Discourse.getURL }); diff --git a/app/assets/javascripts/discourse/components/topic-entrance.js.es6 b/app/assets/javascripts/discourse/components/topic-entrance.js.es6 index 997171aa97d..216f024fc60 100644 --- a/app/assets/javascripts/discourse/components/topic-entrance.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-entrance.js.es6 @@ -32,9 +32,11 @@ export default Ember.Component.extend(CleansUp, { topic: null, visible: null, - @computed("topic.created_at") createdDate: createdAt => new Date(createdAt), + @computed("topic.created_at") + createdDate: createdAt => new Date(createdAt), - @computed("topic.bumped_at") bumpedDate: bumpedAt => new Date(bumpedAt), + @computed("topic.bumped_at") + bumpedDate: bumpedAt => new Date(bumpedAt), @computed("createdDate", "bumpedDate") showTime(createdDate, bumpedDate) { diff --git a/app/assets/javascripts/discourse/controllers/composer.js.es6 b/app/assets/javascripts/discourse/controllers/composer.js.es6 index 870f60b854e..f3f26754901 100644 --- a/app/assets/javascripts/discourse/controllers/composer.js.es6 +++ b/app/assets/javascripts/discourse/controllers/composer.js.es6 @@ -287,7 +287,8 @@ export default Ember.Controller.extend({ return authorizesOneOrMoreExtensions(); }, - @computed() uploadIcon: () => uploadIcon(), + @computed() + uploadIcon: () => uploadIcon(), actions: { cancelUpload() { diff --git a/app/assets/javascripts/discourse/controllers/static.js.es6 b/app/assets/javascripts/discourse/controllers/static.js.es6 index 6d3cbd2df15..8238d5fad9f 100644 --- a/app/assets/javascripts/discourse/controllers/static.js.es6 +++ b/app/assets/javascripts/discourse/controllers/static.js.es6 @@ -7,7 +7,8 @@ export default Ember.Controller.extend({ showLoginButton: Em.computed.equal("model.path", "login"), - @computed("model.path") bodyClass: path => `static-${path}`, + @computed("model.path") + bodyClass: path => `static-${path}`, @computed("model.path") showSignupButton() { diff --git a/app/assets/javascripts/discourse/controllers/upload-selector.js.es6 b/app/assets/javascripts/discourse/controllers/upload-selector.js.es6 index 918128d0c23..b22674657bc 100644 --- a/app/assets/javascripts/discourse/controllers/upload-selector.js.es6 +++ b/app/assets/javascripts/discourse/controllers/upload-selector.js.es6 @@ -25,9 +25,11 @@ export default Ember.Controller.extend(ModalFunctionality, { remote: Ember.computed.equal("selection", "remote"), selection: "local", - @computed() uploadIcon: () => uploadIcon(), + @computed() + uploadIcon: () => uploadIcon(), - @computed() title: () => uploadTranslate("title"), + @computed() + title: () => uploadTranslate("title"), @computed("selection") tip(selection) { diff --git a/app/assets/javascripts/discourse/models/composer.js.es6 b/app/assets/javascripts/discourse/models/composer.js.es6 index 753c9bf7413..801b44c24c4 100644 --- a/app/assets/javascripts/discourse/models/composer.js.es6 +++ b/app/assets/javascripts/discourse/models/composer.js.es6 @@ -75,7 +75,8 @@ const Composer = RestModel.extend({ return this.site.get("archetypes"); }.property(), - @computed("action") sharedDraft: action => action === CREATE_SHARED_DRAFT, + @computed("action") + sharedDraft: action => action === CREATE_SHARED_DRAFT, @computed categoryId: { @@ -133,7 +134,8 @@ const Composer = RestModel.extend({ topicFirstPost: Em.computed.or("creatingTopic", "editingFirstPost"), - @computed("action") editingPost: isEdit, + @computed("action") + editingPost: isEdit, replyingToTopic: Em.computed.equal("action", REPLY), diff --git a/app/assets/javascripts/discourse/models/nav-item.js.es6 b/app/assets/javascripts/discourse/models/nav-item.js.es6 index ad4c0b16952..6a9a782aeaf 100644 --- a/app/assets/javascripts/discourse/models/nav-item.js.es6 +++ b/app/assets/javascripts/discourse/models/nav-item.js.es6 @@ -105,7 +105,8 @@ const NavItem = Discourse.Model.extend({ }); const ExtraNavItem = NavItem.extend({ - @computed("href") href: href => href, + @computed("href") + href: href => href, customFilter: null }); diff --git a/app/assets/javascripts/discourse/models/user.js.es6 b/app/assets/javascripts/discourse/models/user.js.es6 index 74f103e551a..94f972ca27a 100644 --- a/app/assets/javascripts/discourse/models/user.js.es6 +++ b/app/assets/javascripts/discourse/models/user.js.es6 @@ -198,13 +198,17 @@ const User = RestModel.extend({ return suspendedTill && moment(suspendedTill).isAfter(); }, - @computed("suspended_till") suspendedForever: isForever, + @computed("suspended_till") + suspendedForever: isForever, - @computed("silenced_till") silencedForever: isForever, + @computed("silenced_till") + silencedForever: isForever, - @computed("suspended_till") suspendedTillDate: longDate, + @computed("suspended_till") + suspendedTillDate: longDate, - @computed("silenced_till") silencedTillDate: longDate, + @computed("silenced_till") + silencedTillDate: longDate, changeUsername(new_username) { return ajax( diff --git a/app/assets/javascripts/wizard/components/staff-count.js.es6 b/app/assets/javascripts/wizard/components/staff-count.js.es6 index 17df6043d1c..7677d999dea 100644 --- a/app/assets/javascripts/wizard/components/staff-count.js.es6 +++ b/app/assets/javascripts/wizard/components/staff-count.js.es6 @@ -1,5 +1,6 @@ import computed from "ember-addons/ember-computed-decorators"; export default Ember.Component.extend({ - @computed("field.value") showStaffCount: staffCount => staffCount > 1 + @computed("field.value") + showStaffCount: staffCount => staffCount > 1 }); diff --git a/app/assets/javascripts/wizard/components/wizard-step-form.js.es6 b/app/assets/javascripts/wizard/components/wizard-step-form.js.es6 index ff2919bebb1..a60d5b39cb4 100644 --- a/app/assets/javascripts/wizard/components/wizard-step-form.js.es6 +++ b/app/assets/javascripts/wizard/components/wizard-step-form.js.es6 @@ -3,5 +3,6 @@ import computed from "ember-addons/ember-computed-decorators"; export default Ember.Component.extend({ classNameBindings: [":wizard-step-form", "customStepClass"], - @computed("step.id") customStepClass: stepId => `wizard-step-${stepId}` + @computed("step.id") + customStepClass: stepId => `wizard-step-${stepId}` }); diff --git a/app/assets/javascripts/wizard/components/wizard-step.js.es6 b/app/assets/javascripts/wizard/components/wizard-step.js.es6 index d5fb39af769..4732548e8d7 100644 --- a/app/assets/javascripts/wizard/components/wizard-step.js.es6 +++ b/app/assets/javascripts/wizard/components/wizard-step.js.es6 @@ -31,7 +31,8 @@ export default Ember.Component.extend({ this.autoFocus(); }, - @computed("step.index") showQuitButton: index => index === 0, + @computed("step.index") + showQuitButton: index => index === 0, @computed("step.displayIndex", "wizard.totalSteps") showNextButton: (current, total) => current < total, @@ -39,7 +40,8 @@ export default Ember.Component.extend({ @computed("step.displayIndex", "wizard.totalSteps") showDoneButton: (current, total) => current === total, - @computed("step.index") showBackButton: index => index > 0, + @computed("step.index") + showBackButton: index => index > 0, @computed("step.banner") bannerImage(src) { diff --git a/app/assets/javascripts/wizard/mixins/valid-state.js.es6 b/app/assets/javascripts/wizard/mixins/valid-state.js.es6 index cd3faa5e696..ee00842eace 100644 --- a/app/assets/javascripts/wizard/mixins/valid-state.js.es6 +++ b/app/assets/javascripts/wizard/mixins/valid-state.js.es6 @@ -15,11 +15,14 @@ export default { this.set("_validState", States.UNCHECKED); }, - @computed("_validState") valid: state => state === States.VALID, + @computed("_validState") + valid: state => state === States.VALID, - @computed("_validState") invalid: state => state === States.INVALID, + @computed("_validState") + invalid: state => state === States.INVALID, - @computed("_validState") unchecked: state => state === States.UNCHECKED, + @computed("_validState") + unchecked: state => state === States.UNCHECKED, setValid(valid, description) { this.set("_validState", valid ? States.VALID : States.INVALID); diff --git a/app/assets/javascripts/wizard/models/step.js.es6 b/app/assets/javascripts/wizard/models/step.js.es6 index fc1d0ac1f5c..d465b553b46 100644 --- a/app/assets/javascripts/wizard/models/step.js.es6 +++ b/app/assets/javascripts/wizard/models/step.js.es6 @@ -5,7 +5,8 @@ import { ajax } from "wizard/lib/ajax"; export default Ember.Object.extend(ValidState, { id: null, - @computed("index") displayIndex: index => index + 1, + @computed("index") + displayIndex: index => index + 1, @computed("fields.[]") fieldsById(fields) { diff --git a/app/assets/javascripts/wizard/models/wizard.js.es6 b/app/assets/javascripts/wizard/models/wizard.js.es6 index 95fa48bfb03..d83ba58ef00 100644 --- a/app/assets/javascripts/wizard/models/wizard.js.es6 +++ b/app/assets/javascripts/wizard/models/wizard.js.es6 @@ -4,7 +4,8 @@ import { ajax } from "wizard/lib/ajax"; import computed from "ember-addons/ember-computed-decorators"; const Wizard = Ember.Object.extend({ - @computed("steps.length") totalSteps: length => length, + @computed("steps.length") + totalSteps: length => length, getTitle() { const titleStep = this.get("steps").findBy("id", "forum-title"); diff --git a/package.json b/package.json index 0fc51ebb720..2f0744c03db 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "chrome-launcher": "^0.10.2", "chrome-remote-interface": "^0.25.6", "eslint": "^4.19.1", - "prettier": "^1.13.0", + "prettier": "^1.14.0", "puppeteer": "^1.4.0" } } diff --git a/yarn.lock b/yarn.lock index d908e1a0967..ae7b736cce3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -813,9 +813,9 @@ prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" -prettier@1.13.4: - version "1.13.4" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.4.tgz#31bbae6990f13b1093187c731766a14036fa72e6" +prettier@^1.14.0: + version "1.14.0" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.0.tgz#847c235522035fd988100f1f43cf20a7d24f9372" process-nextick-args@~1.0.6: version "1.0.7"