Skip to content

Commit 0b46aae

Browse files
committed
Add lint:watch. Fix lint errors
1 parent 3b2869f commit 0b46aae

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

config/express.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ if (config.env === 'development') {
4040
expressWinston.responseWhitelist.push('body');
4141
app.use(expressWinston.logger({
4242
winstonInstance,
43-
meta: true, // optional: log meta data about request (defaults to true)
43+
meta: true, // optional: log meta data about request (defaults to true)
4444
msg: 'HTTP {{req.method}} {{req.url}} {{res.statusCode}} {{res.responseTime}}ms',
45-
colorStatus: true // Color the status code (default green, 3XX cyan, 4XX yellow, 5XX red).
45+
colorStatus: true // Color the status code (default green, 3XX cyan, 4XX yellow, 5XX red).
4646
}));
4747
}
4848

@@ -77,7 +77,7 @@ if (config.env !== 'test') {
7777
}
7878

7979
// error handler, send stacktrace only during development
80-
app.use((err, req, res, next) => // eslint-disable-line no-unused-vars
80+
app.use((err, req, res, next) => // eslint-disable-line no-unused-vars
8181
res.status(err.status).json({
8282
message: err.isPublic ? err.message : httpStatus[err.status],
8383
stack: config.env === 'development' ? err.stack : {}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"scripts": {
1313
"start": "gulp serve",
1414
"build": "gulp",
15-
"lint": "eslint *.js server/**/*.js config/**/*.js && echo Lint Passed ❤",
15+
"lint": "esw *.js server/**/*.js config/**/*.js --color",
16+
"lint:watch": "npm run lint -- --watch",
1617
"test": "gulp mocha",
1718
"commit": "git-cz",
1819
"report-coverage": "coveralls < ./coverage/lcov.info"
@@ -68,6 +69,7 @@
6869
"eslint": "3.8.0",
6970
"eslint-config-airbnb-base": "7.1.0",
7071
"eslint-plugin-import": "1.16.0",
72+
"eslint-watch": "2.1.14",
7173
"ghooks": "^1.2.4",
7274
"gulp": "3.9.1",
7375
"gulp-babel": "6.1.2",

0 commit comments

Comments
 (0)