add some eslint rules

This commit is contained in:
Matteo Pagliazzi
2015-11-03 22:22:33 +01:00
parent cbca250b99
commit 54d89a59e3
2 changed files with 39 additions and 2 deletions

View File

@@ -17,7 +17,44 @@
"no-fallthrough": 2,
"no-floating-decimal": 2,
"no-empty-pattern": 2,
"no-empty-label": 2
"no-empty-label": 2,
"no-lone-blocks": 2,
"no-loop-func": 2,
"no-implicit-coercion": 2,
"no-implied-eval": 2,
"no-invalid-this": 2,
"no-magic-numbers": 2,
"no-native-reassign": 2,
"no-new-func": 2,
"no-new-wrappers": 2,
"no-new": 2,
"no-octal-escape": 2,
"no-octal": 2,
"no-param-reassign": 2,
"no-process-env": 2,
"no-proto": 2,
"no-implied-eval": 2,
"yoda": 2,
"wrap-iife": 2,
"radix": 2,
"no-with": 2,
"no-void": 2,
"no-useless-concat": 2,
"no-unused-expressions": 2,
"no-throw-literal": 2,
"no-sequences": 2,
"no-self-compare": 2,
"no-return-assign": 2,
"no-redeclare": 2,
"strict": [2, "global"],
"no-delete-var": 2,
"no-label-var": 2,
"no-shadow-restricted-names": 2,
"no-shadow": [2, { "builtinGlobals": true }],
"no-undef-init": 2,
"no-undef": [2, { typeof: true }],
"no-unused-vars": 2,
"no-use-before-define": 2
},
"env": {
"es6": true,

View File

@@ -10,7 +10,7 @@ let InternalServerError = errors.InternalServerError;
module.exports = function (err, req, res, next) {
// Log the original error with some metadata
let stack = err.stack || err.message || err;
logging.error(stack, {
logger.error(stack, {
originalUrl: req.originalUrl,
headers: req.headers,
body: req.body