mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): Remove linting exceptions in nodes-base (no-changelog) (#4944)
This commit is contained in:
@@ -128,9 +128,7 @@ export class MqttTrigger implements INodeType {
|
||||
client = mqtt.connect(brokerUrl, clientOptions);
|
||||
}
|
||||
|
||||
const self = this;
|
||||
|
||||
async function manualTriggerFunction() {
|
||||
const manualTriggerFunction = async () => {
|
||||
await new Promise((resolve, reject) => {
|
||||
client.on('connect', () => {
|
||||
client.subscribe(topicsQoS as mqtt.ISubscriptionMap, (err, _granted) => {
|
||||
@@ -155,7 +153,7 @@ export class MqttTrigger implements INodeType {
|
||||
//@ts-ignore
|
||||
result = [message as string];
|
||||
}
|
||||
self.emit([self.helpers.returnJsonArray(result)]);
|
||||
this.emit([this.helpers.returnJsonArray(result)]);
|
||||
resolve(true);
|
||||
});
|
||||
});
|
||||
@@ -165,7 +163,7 @@ export class MqttTrigger implements INodeType {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
if (this.getMode() === 'trigger') {
|
||||
await manualTriggerFunction();
|
||||
|
||||
Reference in New Issue
Block a user