mirror of https://gitee.com/bigwinds/arangodb
Linting.
This commit is contained in:
parent
6e9900c462
commit
273d16c0ed
|
@ -2,11 +2,14 @@
|
||||||
"bitwise": true,
|
"bitwise": true,
|
||||||
"curly": true,
|
"curly": true,
|
||||||
"eqeqeq": true,
|
"eqeqeq": true,
|
||||||
|
"esnext": true,
|
||||||
"forin": true,
|
"forin": true,
|
||||||
"freeze": true,
|
"freeze": true,
|
||||||
"globalstrict": true,
|
"globalstrict": true,
|
||||||
"immed": true,
|
"immed": true,
|
||||||
|
"indent": 2,
|
||||||
"laxbreak": true,
|
"laxbreak": true,
|
||||||
|
"maxlen": 120,
|
||||||
"newcap": true,
|
"newcap": true,
|
||||||
"noarg": true,
|
"noarg": true,
|
||||||
"node": true,
|
"node": true,
|
||||||
|
@ -15,7 +18,5 @@
|
||||||
"nonew": true,
|
"nonew": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"undef": true,
|
"undef": true,
|
||||||
"unused": true,
|
"unused": true
|
||||||
"indent": 2,
|
|
||||||
"maxlen": 120
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
/*global applicationContext */
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const _ = require('underscore');
|
const _ = require('underscore');
|
||||||
const joi = require('joi');
|
const joi = require('joi');
|
||||||
const internal = require('internal');
|
const internal = require('internal');
|
||||||
|
|
|
@ -1399,7 +1399,7 @@ function require (path) {
|
||||||
try {
|
try {
|
||||||
fn = internal.executeScript("(" + script + ")", undefined, filename);
|
fn = internal.executeScript("(" + script + ")", undefined, filename);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// This should never happen, right?
|
require('console').errorLines(e);
|
||||||
throw extend(new internal.ArangoError({
|
throw extend(new internal.ArangoError({
|
||||||
errorNum: internal.errors.ERROR_SYNTAX_ERROR_IN_SCRIPT.code,
|
errorNum: internal.errors.ERROR_SYNTAX_ERROR_IN_SCRIPT.code,
|
||||||
errorMessage: internal.errors.ERROR_SYNTAX_ERROR_IN_SCRIPT.message
|
errorMessage: internal.errors.ERROR_SYNTAX_ERROR_IN_SCRIPT.message
|
||||||
|
@ -1416,6 +1416,7 @@ function require (path) {
|
||||||
return args[key];
|
return args[key];
|
||||||
}));
|
}));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
require('console').errorLines(e);
|
||||||
throw extend(new internal.ArangoError({
|
throw extend(new internal.ArangoError({
|
||||||
errorNum: internal.errors.ERROR_MODULE_FAILURE.code,
|
errorNum: internal.errors.ERROR_MODULE_FAILURE.code,
|
||||||
errorMessage: internal.errors.ERROR_MODULE_FAILURE.message
|
errorMessage: internal.errors.ERROR_MODULE_FAILURE.message
|
||||||
|
|
|
@ -50,10 +50,10 @@ function decorateController(auth, controller) {
|
||||||
secret: cfg.cookie.secret,
|
secret: cfg.cookie.secret,
|
||||||
algorithm: cfg.cookie.algorithm
|
algorithm: cfg.cookie.algorithm
|
||||||
}
|
}
|
||||||
});
|
} : undefined);
|
||||||
}
|
}
|
||||||
if (cfg.header) {
|
if (!sid && cfg.header) {
|
||||||
sid = sid || req.headers[cfg.header.toLowerCase()];
|
sid = req.headers[cfg.header.toLowerCase()];
|
||||||
}
|
}
|
||||||
if (sid) {
|
if (sid) {
|
||||||
if (cfg.jwt) {
|
if (cfg.jwt) {
|
||||||
|
|
Loading…
Reference in New Issue