Skip to content

Commit

Permalink
fix(plugin): Fix collecting keys for a plugin's rule set
Browse files Browse the repository at this point in the history
Fixes the concatenation of all referenced plugins' rule sets.
  • Loading branch information
ta2edchimp committed Mar 20, 2016
1 parent 256ff6e commit ae0bde2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ function getPluginRules(conf) {
var plugins = conf.plugins
if (plugins) {
plugins.forEach(function normalizePluginRule(plugin) {
rules.concat(require('eslint-plugin-' + plugin).rules)
var thisPluginsConfig = require('eslint-plugin-' + plugin)
var thisPluginsRules = thisPluginsConfig.rules
if (typeof thisPluginsRules === 'object') {
rules = rules.concat(Object.keys(thisPluginsRules))
}
})
}
return rules
Expand Down

0 comments on commit ae0bde2

Please sign in to comment.