Skip to content

Commit f37496b

Browse files
authored
Update mssql.js
fix ESLint error
1 parent 672ada6 commit f37496b

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

src/mssql.js

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ module.exports = function (RED) {
335335
// node-mssql 5.x to 6.x changes
336336
// ConnectionPool.close() now returns a promise / callbacks will be executed once closing of the
337337
if (node.pool && node.pool.close) {
338-
node.pool.close().catch(() => {});
338+
node.pool.close().catch(() => {})
339339
}
340340
if (updateStatusAndLog) node.status({ fill: 'grey', shape: 'dot', text: 'disconnected' })
341341
node.poolConnect = null
@@ -474,29 +474,29 @@ module.exports = function (RED) {
474474
type: 'text'
475475
}
476476
}
477-
});
478-
479-
function mssql(config) {
480-
RED.nodes.createNode(this, config);
481-
const mssqlCN = RED.nodes.getNode(config.mssqlCN);
482-
const node = this;
483-
484-
node.query = config.query;
485-
node.outField = config.outField || 'payload';
486-
node.returnType = config.returnType;
487-
node.throwErrors = !(!config.throwErrors || config.throwErrors === '0');
488-
node.params = config.params;
489-
node.queryMode = config.queryMode;
490-
491-
node.modeOpt = config.modeOpt;
492-
node.modeOptType = config.modeOptType || 'query';
493-
node.queryOpt = config.queryOpt;
494-
node.queryOptType = config.queryOptType || 'editor';
495-
node.paramsOpt = config.paramsOpt;
496-
node.paramsOptType = config.paramsOptType || 'none';
497-
node.rows = config.rows || 'rows';
498-
node.rowsType = config.rowsType || 'msg';
499-
node.parseMustache = !(config.parseMustache === false || config.parseMustache === 'false'); // if not explicitly set to false, then enable mustache parsing
477+
})
478+
479+
function mssql (config) {
480+
RED.nodes.createNode(this, config)
481+
const mssqlCN = RED.nodes.getNode(config.mssqlCN)
482+
const node = this
483+
484+
node.query = config.query
485+
node.outField = config.outField || 'payload'
486+
node.returnType = config.returnType
487+
node.throwErrors = !(!config.throwErrors || config.throwErrors === '0')
488+
node.params = config.params
489+
node.queryMode = config.queryMode
490+
491+
node.modeOpt = config.modeOpt
492+
node.modeOptType = config.modeOptType || 'query'
493+
node.queryOpt = config.queryOpt
494+
node.queryOptType = config.queryOptType || 'editor'
495+
node.paramsOpt = config.paramsOpt
496+
node.paramsOptType = config.paramsOptType || 'none'
497+
node.rows = config.rows || 'rows'
498+
node.rowsType = config.rowsType || 'msg'
499+
node.parseMustache = !(config.parseMustache === false || config.parseMustache === 'false') // if not explicitly set to false, then enable mustache parsing
500500

501501
const setResult = function (msg, field, value, returnType = 0) {
502502
// eslint-disable-next-line eqeqeq
@@ -752,11 +752,11 @@ module.exports = function (RED) {
752752
}
753753
}
754754

755-
const promises = [];
756-
const resolvedTokens = {};
757-
let tokens;
755+
const promises = []
756+
const resolvedTokens = {}
757+
let tokens
758758
if (node.parseMustache) {
759-
tokens = extractTokens(mustache.parse(msg.query));
759+
tokens = extractTokens(mustache.parse(msg.query))
760760
tokens.forEach(function (name) {
761761
const envName = parseEnv(name)
762762
if (envName) {
@@ -789,7 +789,7 @@ module.exports = function (RED) {
789789
promises.push(promise)
790790
}
791791
}
792-
});
792+
})
793793
}
794794
if (tokens && tokens.size > 0) {
795795
Promise.all(promises).then(function () {

0 commit comments

Comments
 (0)