DEV: prettier 1.14.0

This commit is contained in:
Joffrey JAFFEUX 2018-07-30 11:09:08 -04:00 committed by GitHub
parent 17b851cf08
commit 1f899bec21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 60 additions and 32 deletions

View File

@ -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({ AdminUser.reopenClass({

View File

@ -31,7 +31,8 @@ export default Ember.Component.extend({
} }
}, },
@computed("formattedBackupCodes") base64BackupCode: b64EncodeUnicode, @computed("formattedBackupCodes")
base64BackupCode: b64EncodeUnicode,
@computed("backupCodes") @computed("backupCodes")
formattedBackupCodes(backupCodes) { formattedBackupCodes(backupCodes) {

View File

@ -18,7 +18,8 @@ export default Ember.Component.extend({
return hasDraft ? "topic.open_draft" : "topic.create"; 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") @computed("filterMode", "category", "noSubcategories")
navItems(filterMode, category, noSubcategories) { navItems(filterMode, category, noSubcategories) {

View File

@ -1,5 +1,6 @@
import computed from "ember-addons/ember-computed-decorators"; import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({ export default Ember.Component.extend({
@computed("post.url") postUrl: Discourse.getURL @computed("post.url")
postUrl: Discourse.getURL
}); });

View File

@ -32,9 +32,11 @@ export default Ember.Component.extend(CleansUp, {
topic: null, topic: null,
visible: 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") @computed("createdDate", "bumpedDate")
showTime(createdDate, bumpedDate) { showTime(createdDate, bumpedDate) {

View File

@ -287,7 +287,8 @@ export default Ember.Controller.extend({
return authorizesOneOrMoreExtensions(); return authorizesOneOrMoreExtensions();
}, },
@computed() uploadIcon: () => uploadIcon(), @computed()
uploadIcon: () => uploadIcon(),
actions: { actions: {
cancelUpload() { cancelUpload() {

View File

@ -7,7 +7,8 @@ export default Ember.Controller.extend({
showLoginButton: Em.computed.equal("model.path", "login"), showLoginButton: Em.computed.equal("model.path", "login"),
@computed("model.path") bodyClass: path => `static-${path}`, @computed("model.path")
bodyClass: path => `static-${path}`,
@computed("model.path") @computed("model.path")
showSignupButton() { showSignupButton() {

View File

@ -25,9 +25,11 @@ export default Ember.Controller.extend(ModalFunctionality, {
remote: Ember.computed.equal("selection", "remote"), remote: Ember.computed.equal("selection", "remote"),
selection: "local", selection: "local",
@computed() uploadIcon: () => uploadIcon(), @computed()
uploadIcon: () => uploadIcon(),
@computed() title: () => uploadTranslate("title"), @computed()
title: () => uploadTranslate("title"),
@computed("selection") @computed("selection")
tip(selection) { tip(selection) {

View File

@ -75,7 +75,8 @@ const Composer = RestModel.extend({
return this.site.get("archetypes"); return this.site.get("archetypes");
}.property(), }.property(),
@computed("action") sharedDraft: action => action === CREATE_SHARED_DRAFT, @computed("action")
sharedDraft: action => action === CREATE_SHARED_DRAFT,
@computed @computed
categoryId: { categoryId: {
@ -133,7 +134,8 @@ const Composer = RestModel.extend({
topicFirstPost: Em.computed.or("creatingTopic", "editingFirstPost"), topicFirstPost: Em.computed.or("creatingTopic", "editingFirstPost"),
@computed("action") editingPost: isEdit, @computed("action")
editingPost: isEdit,
replyingToTopic: Em.computed.equal("action", REPLY), replyingToTopic: Em.computed.equal("action", REPLY),

View File

@ -105,7 +105,8 @@ const NavItem = Discourse.Model.extend({
}); });
const ExtraNavItem = NavItem.extend({ const ExtraNavItem = NavItem.extend({
@computed("href") href: href => href, @computed("href")
href: href => href,
customFilter: null customFilter: null
}); });

View File

@ -198,13 +198,17 @@ const User = RestModel.extend({
return suspendedTill && moment(suspendedTill).isAfter(); 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) { changeUsername(new_username) {
return ajax( return ajax(

View File

@ -1,5 +1,6 @@
import computed from "ember-addons/ember-computed-decorators"; import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({ export default Ember.Component.extend({
@computed("field.value") showStaffCount: staffCount => staffCount > 1 @computed("field.value")
showStaffCount: staffCount => staffCount > 1
}); });

View File

@ -3,5 +3,6 @@ import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({ export default Ember.Component.extend({
classNameBindings: [":wizard-step-form", "customStepClass"], classNameBindings: [":wizard-step-form", "customStepClass"],
@computed("step.id") customStepClass: stepId => `wizard-step-${stepId}` @computed("step.id")
customStepClass: stepId => `wizard-step-${stepId}`
}); });

View File

@ -31,7 +31,8 @@ export default Ember.Component.extend({
this.autoFocus(); this.autoFocus();
}, },
@computed("step.index") showQuitButton: index => index === 0, @computed("step.index")
showQuitButton: index => index === 0,
@computed("step.displayIndex", "wizard.totalSteps") @computed("step.displayIndex", "wizard.totalSteps")
showNextButton: (current, total) => current < total, showNextButton: (current, total) => current < total,
@ -39,7 +40,8 @@ export default Ember.Component.extend({
@computed("step.displayIndex", "wizard.totalSteps") @computed("step.displayIndex", "wizard.totalSteps")
showDoneButton: (current, total) => current === total, showDoneButton: (current, total) => current === total,
@computed("step.index") showBackButton: index => index > 0, @computed("step.index")
showBackButton: index => index > 0,
@computed("step.banner") @computed("step.banner")
bannerImage(src) { bannerImage(src) {

View File

@ -15,11 +15,14 @@ export default {
this.set("_validState", States.UNCHECKED); 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) { setValid(valid, description) {
this.set("_validState", valid ? States.VALID : States.INVALID); this.set("_validState", valid ? States.VALID : States.INVALID);

View File

@ -5,7 +5,8 @@ import { ajax } from "wizard/lib/ajax";
export default Ember.Object.extend(ValidState, { export default Ember.Object.extend(ValidState, {
id: null, id: null,
@computed("index") displayIndex: index => index + 1, @computed("index")
displayIndex: index => index + 1,
@computed("fields.[]") @computed("fields.[]")
fieldsById(fields) { fieldsById(fields) {

View File

@ -4,7 +4,8 @@ import { ajax } from "wizard/lib/ajax";
import computed from "ember-addons/ember-computed-decorators"; import computed from "ember-addons/ember-computed-decorators";
const Wizard = Ember.Object.extend({ const Wizard = Ember.Object.extend({
@computed("steps.length") totalSteps: length => length, @computed("steps.length")
totalSteps: length => length,
getTitle() { getTitle() {
const titleStep = this.get("steps").findBy("id", "forum-title"); const titleStep = this.get("steps").findBy("id", "forum-title");

View File

@ -11,7 +11,7 @@
"chrome-launcher": "^0.10.2", "chrome-launcher": "^0.10.2",
"chrome-remote-interface": "^0.25.6", "chrome-remote-interface": "^0.25.6",
"eslint": "^4.19.1", "eslint": "^4.19.1",
"prettier": "^1.13.0", "prettier": "^1.14.0",
"puppeteer": "^1.4.0" "puppeteer": "^1.4.0"
} }
} }

View File

@ -813,9 +813,9 @@ prelude-ls@~1.1.2:
version "1.1.2" version "1.1.2"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
prettier@1.13.4: prettier@^1.14.0:
version "1.13.4" version "1.14.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.4.tgz#31bbae6990f13b1093187c731766a14036fa72e6" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.0.tgz#847c235522035fd988100f1f43cf20a7d24f9372"
process-nextick-args@~1.0.6: process-nextick-args@~1.0.6:
version "1.0.7" version "1.0.7"