DEV: Fix "no-setter-return" lint (#24585)

This commit is contained in:
Jarek Radosz 2023-11-28 10:49:49 +01:00 committed by GitHub
parent cfa7dcaf0a
commit 22210a9c15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 4 additions and 13 deletions

View File

@ -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")

View File

@ -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

View File

@ -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;
} }
} }

View File

@ -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;
} }
} }

View File

@ -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;
} }
} }

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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() {