mirror of https://gitee.com/bigwinds/arangodb
Linting.
This commit is contained in:
parent
6e9900c462
commit
273d16c0ed
|
@ -2,11 +2,14 @@
|
|||
"bitwise": true,
|
||||
"curly": true,
|
||||
"eqeqeq": true,
|
||||
"esnext": true,
|
||||
"forin": true,
|
||||
"freeze": true,
|
||||
"globalstrict": true,
|
||||
"immed": true,
|
||||
"indent": 2,
|
||||
"laxbreak": true,
|
||||
"maxlen": 120,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"node": true,
|
||||
|
@ -15,7 +18,5 @@
|
|||
"nonew": true,
|
||||
"strict": true,
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"indent": 2,
|
||||
"maxlen": 120
|
||||
"unused": true
|
||||
}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
/*global applicationContext */
|
||||
'use strict';
|
||||
|
||||
const _ = require('underscore');
|
||||
const joi = require('joi');
|
||||
const internal = require('internal');
|
||||
|
|
|
@ -1378,17 +1378,17 @@ function require (path) {
|
|||
var keys = Object.keys(args);
|
||||
|
||||
// script = Function.apply(null, keys.concat(content));
|
||||
// do not use Function constructor here... this is because the following code
|
||||
// do not use Function constructor here... this is because the following code
|
||||
//
|
||||
// f = new Function("a", "b", "return 1");
|
||||
//
|
||||
//
|
||||
// will create the following function code in current V8:
|
||||
//
|
||||
// function anonymous(a,b
|
||||
// /**/) {
|
||||
// return 1
|
||||
// }
|
||||
//
|
||||
//
|
||||
// Though the function code is correct, the line numbers in the generated code
|
||||
// will be off by two lines due to V8 inserting two line breaks above the function body.
|
||||
// Generating the function as follows will avoid that:
|
||||
|
@ -1399,7 +1399,7 @@ function require (path) {
|
|||
try {
|
||||
fn = internal.executeScript("(" + script + ")", undefined, filename);
|
||||
} catch (e) {
|
||||
// This should never happen, right?
|
||||
require('console').errorLines(e);
|
||||
throw extend(new internal.ArangoError({
|
||||
errorNum: internal.errors.ERROR_SYNTAX_ERROR_IN_SCRIPT.code,
|
||||
errorMessage: internal.errors.ERROR_SYNTAX_ERROR_IN_SCRIPT.message
|
||||
|
@ -1416,6 +1416,7 @@ function require (path) {
|
|||
return args[key];
|
||||
}));
|
||||
} catch (e) {
|
||||
require('console').errorLines(e);
|
||||
throw extend(new internal.ArangoError({
|
||||
errorNum: internal.errors.ERROR_MODULE_FAILURE.code,
|
||||
errorMessage: internal.errors.ERROR_MODULE_FAILURE.message
|
||||
|
|
|
@ -50,10 +50,10 @@ function decorateController(auth, controller) {
|
|||
secret: cfg.cookie.secret,
|
||||
algorithm: cfg.cookie.algorithm
|
||||
}
|
||||
});
|
||||
} : undefined);
|
||||
}
|
||||
if (cfg.header) {
|
||||
sid = sid || req.headers[cfg.header.toLowerCase()];
|
||||
if (!sid && cfg.header) {
|
||||
sid = req.headers[cfg.header.toLowerCase()];
|
||||
}
|
||||
if (sid) {
|
||||
if (cfg.jwt) {
|
||||
|
|
Loading…
Reference in New Issue