Skip to content

Commit 8b1519c

Browse files
committed
lint: require parans to construct objects
1 parent 1c56f4a commit 8b1519c

File tree

7 files changed

+7
-6
lines changed

7 files changed

+7
-6
lines changed

.eslintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"comma-dangle": [2, "never"],
77
"consistent-return": 2,
88
"indent": [2, 2, { "VariableDeclarator": 2, "SwitchCase": 1 }],
9+
"new-parens": 2,
910
"no-cond-assign": 2,
1011
"no-constant-condition": 2,
1112
"no-control-regex": 2,

lib/Pool.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ Pool.prototype.query = function (sql, values, cb) {
194194

195195
if (this.config.connectionConfig.trace) {
196196
// Long stack trace support
197-
query._callSite = new Error;
197+
query._callSite = new Error();
198198
}
199199

200200
this.getConnection(function (err, conn) {

lib/PoolNamespace.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ PoolNamespace.prototype.query = function (sql, values, cb) {
8585

8686
if (clusterNode.pool.config.connectionConfig.trace) {
8787
// Long stack trace support
88-
query._callSite = new Error;
88+
query._callSite = new Error();
8989
}
9090

9191
cluster._getConnection(clusterNode, function (err, conn) {

lib/protocol/Protocol.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Protocol.prototype._enqueue = function(sequence) {
138138

139139
if (this._config.trace) {
140140
// Long stack trace support
141-
sequence._callSite = sequence._callSite || new Error;
141+
sequence._callSite = sequence._callSite || new Error();
142142
}
143143

144144
this._queue.push(sequence);

lib/protocol/sequences/Ping.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ function Ping(options, callback) {
1515
}
1616

1717
Ping.prototype.start = function() {
18-
this.emit('packet', new Packets.ComPingPacket);
18+
this.emit('packet', new Packets.ComPingPacket());
1919
};

lib/protocol/sequences/Quit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ function Quit(options, callback) {
1414
}
1515

1616
Quit.prototype.start = function() {
17-
this.emit('packet', new Packets.ComQuitPacket);
17+
this.emit('packet', new Packets.ComQuitPacket());
1818
};

lib/protocol/sequences/Statistics.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function Statistics(options, callback) {
1414
}
1515

1616
Statistics.prototype.start = function() {
17-
this.emit('packet', new Packets.ComStatisticsPacket);
17+
this.emit('packet', new Packets.ComStatisticsPacket());
1818
};
1919

2020
Statistics.prototype['StatisticsPacket'] = function (packet) {

0 commit comments

Comments
 (0)