Skip to content

Commit

Permalink
lint: remove all unused varaibles
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Aug 6, 2017
1 parent 44881fa commit e006622
Show file tree
Hide file tree
Showing 18 changed files with 2 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"rules": {
"eol-last": "error",
"indent": ["error", 2, { "SwitchCase": 1 }],
"no-trailing-spaces": "error"
"no-trailing-spaces": "error",
"no-unused-vars": ["error", { "vars": "all", "args": "none", "ignoreRestSiblings": true }]
}
}
1 change: 0 additions & 1 deletion benchmarks/middleware.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

var http = require('http');
var express = require('..');
var app = express();

Expand Down
1 change: 0 additions & 1 deletion examples/view-constructor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*/

var express = require('../../');
var http = require('http');
var GithubView = require('./github-view');
var md = require('marked').parse;

Expand Down
1 change: 0 additions & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ var contentType = require('content-type');
var deprecate = require('depd')('express');
var flatten = require('array-flatten');
var mime = require('send').mime;
var basename = require('path').basename;
var etag = require('etag');
var proxyaddr = require('proxy-addr');
var qs = require('qs');
Expand Down
1 change: 0 additions & 1 deletion lib/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
var debug = require('debug')('express:view');
var path = require('path');
var fs = require('fs');
var utils = require('./utils');

/**
* Module variables.
Expand Down
1 change: 0 additions & 1 deletion test/Route.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ var should = require('should');
var express = require('../')
, Route = express.Route
, methods = require('methods')
, assert = require('assert');

describe('Route', function(){
it('should work without handlers', function(done) {
Expand Down
1 change: 0 additions & 1 deletion test/app.listen.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

var express = require('../')
, request = require('supertest');

describe('app.listen()', function(){
it('should wrap with an HTTP server', function(done){
Expand Down
1 change: 0 additions & 1 deletion test/app.locals.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

var express = require('../')
, request = require('supertest');

describe('app', function(){
describe('.locals(obj)', function(){
Expand Down
1 change: 0 additions & 1 deletion test/app.router.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ describe('app.router', function(){

it('should include ' + method.toUpperCase(), function(done){
var app = express();
var calls = [];

app[method]('/foo', function(req, res){
if ('head' == method) {
Expand Down
1 change: 0 additions & 1 deletion test/req.host.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

var express = require('../')
, request = require('supertest')
, assert = require('assert');

describe('req', function(){
describe('.host', function(){
Expand Down
1 change: 0 additions & 1 deletion test/req.hostname.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

var express = require('../')
, request = require('supertest')
, assert = require('assert');

describe('req', function(){
describe('.hostname', function(){
Expand Down
1 change: 0 additions & 1 deletion test/req.range.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

var assert = require('assert');
var express = require('..');
var request = require('supertest')

Expand Down
1 change: 0 additions & 1 deletion test/res.download.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ describe('res', function(){

it('should remove Content-Disposition', function(done){
var app = express()
, calls = 0;

app.use(function (req, res, next) {
res.download('test/fixtures/foobar.html', function(err){
Expand Down
1 change: 0 additions & 1 deletion test/res.format.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

var express = require('../')
, request = require('supertest')
, utils = require('../lib/utils')
, assert = require('assert');

var app1 = express();
Expand Down
1 change: 0 additions & 1 deletion test/res.send.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

var assert = require('assert');
var express = require('..');
var methods = require('methods');
var request = require('supertest');
Expand Down
4 changes: 0 additions & 4 deletions test/res.sendFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,12 +446,10 @@ describe('res', function(){

it('should invoke the callback on 403', function(done){
var app = express()
, calls = 0;

app.use(function(req, res){
res.sendfile('test/fixtures/foo/../user.html', function(err){
assert(!res.headersSent);
++calls;
res.send(err.message);
});
});
Expand All @@ -464,7 +462,6 @@ describe('res', function(){

it('should invoke the callback on socket error', function(done){
var app = express()
, calls = 0;

app.use(function(req, res){
res.sendfile('test/fixtures/user.html', function(err){
Expand Down Expand Up @@ -715,7 +712,6 @@ describe('res', function(){
describe('with non-GET', function(){
it('should still serve', function(done){
var app = express()
, calls = 0;

app.use(function(req, res){
res.sendfile(path.join(__dirname, '/fixtures/name.txt'))
Expand Down
1 change: 0 additions & 1 deletion test/res.sendStatus.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

var assert = require('assert')
var express = require('..')
var request = require('supertest')

Expand Down
1 change: 0 additions & 1 deletion test/res.vary.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

var assert = require('assert');
var express = require('..');
var request = require('supertest');
var utils = require('./support/utils');
Expand Down

0 comments on commit e006622

Please sign in to comment.