Skip to content

Commit eeca132

Browse files
committed
lint: remove unused variables
1 parent e18600f commit eeca132

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+58
-80
lines changed

.eslintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"no-trailing-spaces": 2,
3333
"no-unexpected-multiline": 2,
3434
"no-unreachable": 2,
35+
"no-unused-vars": 2,
3536
"quotes": [2, "single", { "avoidEscape": true, "allowTemplateLiterals": true }],
3637
"semi": [2, "always"],
3738
"use-isnan": 2,

benchmark/parse-100k-blog-rows.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ var options = {
1111
};
1212

1313
console.error('Config:', options);
14+
run();
1415

1516
function createBuffers() {
1617
var parser = new Parser();
1718

1819
process.stderr.write('Creating row buffers ... ');
1920

2021
var number = 1;
21-
var id = 0;
2222
var start = Date.now();
2323

2424
var buffers = [
@@ -53,7 +53,7 @@ function createPacketBuffer(parser, packet) {
5353
return writer.toBuffer(parser);
5454
}
5555

56-
function createRowDataPacketBuffer(parser, number) {
56+
function createRowDataPacketBuffer(parser) {
5757
var writer = new PacketWriter();
5858

5959
writer.writeLengthCodedString(parser._nextPacketNumber);

benchmark/select-100k-blog-rows.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var rowsPerRun = 100000;
55
client.connect(function(err) {
66
if (err) throw err;
77

8-
client.query('USE node_mysql_test', function(err, results) {
8+
client.query('USE node_mysql_test', function(err) {
99
if (err) throw err;
1010

1111
selectRows();

lib/Connection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Connection.prototype.connect = function connect(options, callback) {
105105
this._protocol.on('end', function() {
106106
connection._socket.end();
107107
});
108-
this._socket.on('end', function(err) {
108+
this._socket.on('end', function() {
109109
connection._protocol.end();
110110
});
111111

lib/Pool.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ Pool.prototype.acquireConnection = function acquireConnection(connection, cb) {
119119
};
120120

121121
Pool.prototype.releaseConnection = function releaseConnection(connection) {
122-
var pool = this;
123122

124123
if (this._acquiringConnections.indexOf(connection) !== -1) {
125124
// connection is being acquired

lib/PoolConnection.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ function PoolConnection(pool, options) {
2727

2828
PoolConnection.prototype.release = function release() {
2929
var pool = this._pool;
30-
var connection = this;
3130

3231
if (!pool || pool._closed) {
3332
return undefined;

lib/protocol/packets/ComPingPacket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = ComPingPacket;
2-
function ComPingPacket(sql) {
2+
function ComPingPacket() {
33
this.command = 0x0e;
44
}
55

lib/protocol/packets/ComQuitPacket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = ComQuitPacket;
2-
function ComQuitPacket(sql) {
2+
function ComQuitPacket() {
33
this.command = 0x01;
44
}
55

lib/protocol/packets/ComStatisticsPacket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = ComStatisticsPacket;
2-
function ComStatisticsPacket(sql) {
2+
function ComStatisticsPacket() {
33
this.command = 0x09;
44
}
55

lib/protocol/packets/EmptyPacket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ module.exports = EmptyPacket;
22
function EmptyPacket() {
33
}
44

5-
EmptyPacket.prototype.write = function(writer) {
5+
EmptyPacket.prototype.write = function write() {
66
};

0 commit comments

Comments
 (0)