Skip to content

Commit a00c28b

Browse files
authored
Merge pull request #91 from KunalKapadia/develop
Add lint:watch task. Add .npmrc and update dependencies
2 parents 8cba265 + 0b46aae commit a00c28b

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
save-exact=true

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: 5 additions & 3 deletions
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"
@@ -47,7 +48,7 @@
4748
"express-winston": "2.0.0",
4849
"helmet": "2.3.0",
4950
"http-status": "^0.2.0",
50-
"joi": "9.1.0",
51+
"joi": "9.1.1",
5152
"jsonwebtoken": "7.1.9",
5253
"method-override": "^2.3.5",
5354
"mongoose": "4.6.3",
@@ -65,9 +66,10 @@
6566
"coveralls": "^2.11.6",
6667
"cz-conventional-changelog": "1.2.0",
6768
"del": "^2.2.0",
68-
"eslint": "3.7.1",
69+
"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)