From e73321391dbcb64f69434e66caeed75c582de631 Mon Sep 17 00:00:00 2001 From: Justin Marrington Date: Mon, 25 Jul 2016 11:38:16 +1000 Subject: [PATCH] Add support for eslint 'env' configuration --- lib/utils/style-settings.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/utils/style-settings.js b/lib/utils/style-settings.js index 056283f..9aa23be 100644 --- a/lib/utils/style-settings.js +++ b/lib/utils/style-settings.js @@ -93,5 +93,17 @@ module.exports = function checkStyleSettings (filePath) { this.args.globals.push(item) }.bind(this)) } + + if (styleSettings.env) { + for (let envKey in styleSettings.env) { + if (!styleSettings.env.hasOwnProperty(envKey)) { + continue + } + if (!this.args.env) { + this.args.env = {} + } + this.args.env[envKey] = styleSettings.env[envKey] + } + } } }