mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 03:16:41 +08:00
DEV: Fix "no-setter-return" lint (#24585)
This commit is contained in:
parent
cfa7dcaf0a
commit
22210a9c15
|
@ -69,7 +69,6 @@ export default class AdminThemeEditor extends Component {
|
||||||
|
|
||||||
set activeSection(value) {
|
set activeSection(value) {
|
||||||
this.theme.setField(this.currentTargetName, this.fieldName, value);
|
this.theme.setField(this.currentTargetName, this.fieldName, value);
|
||||||
return value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@discourseComputed("maximized")
|
@discourseComputed("maximized")
|
||||||
|
|
|
@ -30,7 +30,6 @@ export default class EmailStylesEditor extends Component {
|
||||||
|
|
||||||
set editorContents(value) {
|
set editorContents(value) {
|
||||||
this.styles.setField(this.fieldName, value);
|
this.styles.setField(this.fieldName, value);
|
||||||
return value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
|
|
|
@ -28,6 +28,5 @@ export default class EmbeddingSetting extends Component {
|
||||||
|
|
||||||
set checked(value) {
|
set checked(value) {
|
||||||
this.set("value", value);
|
this.set("value", value);
|
||||||
return value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,5 @@ export default class Bool extends Component {
|
||||||
|
|
||||||
set enabled(value) {
|
set enabled(value) {
|
||||||
this.set("value", value ? "true" : "false");
|
this.set("value", value ? "true" : "false");
|
||||||
return value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ export default class WebhookEventChooser extends Component {
|
||||||
|
|
||||||
// add an association when not exists
|
// add an association when not exists
|
||||||
if (value === this.eventTypeExists) {
|
if (value === this.eventTypeExists) {
|
||||||
return value;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value) {
|
if (value) {
|
||||||
|
@ -33,7 +33,5 @@ export default class WebhookEventChooser extends Component {
|
||||||
eventTypes.filter((eventType) => eventType.name === this.args.type.name)
|
eventTypes.filter((eventType) => eventType.name === this.args.type.name)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,6 @@ export default class ApiKey extends RestModel {
|
||||||
} else {
|
} else {
|
||||||
this.set("_user", value);
|
this.set("_user", value);
|
||||||
}
|
}
|
||||||
return this._user;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@discourseComputed("description")
|
@discourseComputed("description")
|
||||||
|
|
|
@ -198,7 +198,7 @@ const Topic = RestModel.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
set details(value) {
|
set details(value) {
|
||||||
return (this._details = value);
|
this._details = value;
|
||||||
},
|
},
|
||||||
|
|
||||||
@discourseComputed("visible")
|
@discourseComputed("visible")
|
||||||
|
|
|
@ -160,7 +160,7 @@ export default class ComposerService extends Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
set disableSubmit(value) {
|
set disableSubmit(value) {
|
||||||
return this.set("_disableSubmit", value);
|
this.set("_disableSubmit", value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@computed("model.category", "skipFormTemplate")
|
@computed("model.category", "skipFormTemplate")
|
||||||
|
@ -188,7 +188,7 @@ export default class ComposerService extends Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
set formTemplateInitialValues(values) {
|
set formTemplateInitialValues(values) {
|
||||||
return this.set("_formTemplateInitialValues", values);
|
this.set("_formTemplateInitialValues", values);
|
||||||
}
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
|
@ -265,7 +265,6 @@ export default class ComposerService extends Service {
|
||||||
key: "toolbar-enabled",
|
key: "toolbar-enabled",
|
||||||
value: val ? "true" : "false",
|
value: val ? "true" : "false",
|
||||||
});
|
});
|
||||||
return val;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@discourseComputed("model.canEditTitle", "model.creatingPrivateMessage")
|
@discourseComputed("model.canEditTitle", "model.creatingPrivateMessage")
|
||||||
|
|
|
@ -134,7 +134,6 @@ export default class ChatMessage {
|
||||||
set deletedAt(value) {
|
set deletedAt(value) {
|
||||||
this._deletedAt = value;
|
this._deletedAt = value;
|
||||||
this.incrementVersion();
|
this.incrementVersion();
|
||||||
return this._deletedAt;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get cooked() {
|
get cooked() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user