From 503b427b7f9cecbbbdaf3d4ba4e928d699d35c19 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin Date: Fri, 26 Feb 2016 20:25:15 +0000 Subject: [PATCH] eslint no-trailing spaces --- .eslintrc.json | 1 + lib/compile/index.js | 2 +- lib/compile/resolve.js | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 53b80e8..d3439dd 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,7 @@ { "rules": { "indent": [ 2, 2, {"SwitchCase": 1} ], + "no-trailing-spaces": 2, "quotes": [ 2, "single", "avoid-escape" ], "linebreak-style": [ 2, "unix" ], "semi": [ 2, "always" ], diff --git a/lib/compile/index.js b/lib/compile/index.js index 8cadc20..df70ca7 100644 --- a/lib/compile/index.js +++ b/lib/compile/index.js @@ -26,7 +26,7 @@ function compile(schema, root, localRefs, baseId) { /* eslint no-shadow: 0 */ var self = this , opts = this._opts - , refVal = [ undefined ] + , refVal = [ undefined ] , refs = {} , patterns = [] , patternsHash = {} diff --git a/lib/compile/resolve.js b/lib/compile/resolve.js index 77318b5..ec70c02 100644 --- a/lib/compile/resolve.js +++ b/lib/compile/resolve.js @@ -28,7 +28,7 @@ function resolve(compile, root, ref) { if (this._refs[refVal]) refVal = this._refs[refVal]; else return resolve.call(this, compile, root, refVal); } - + refVal = refVal || this._schemas[ref]; if (refVal instanceof SchemaObject) { return inlineRef(refVal.schema, this._opts.inlineRefs) @@ -138,7 +138,7 @@ var SIMPLE_INLINED = util.toHash([ 'maxItems', 'minItems', 'maximum', 'minimum', 'uniqueItems', 'multipleOf', - 'required', 'enum' + 'required', 'enum' ]); function inlineRef(schema, limit) { if (limit === false) return false;