Skip to content

Commit

Permalink
Add support for eslint 'env' configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Marrington committed Jul 25, 2016
1 parent 2206cb6 commit e733213
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/utils/style-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
}
}
}

0 comments on commit e733213

Please sign in to comment.