diff options
Diffstat (limited to 'tools/node_modules/eslint/lib/cli.js')
-rw-r--r-- | tools/node_modules/eslint/lib/cli.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/node_modules/eslint/lib/cli.js b/tools/node_modules/eslint/lib/cli.js index f67eb7274f..9ce81e5542 100644 --- a/tools/node_modules/eslint/lib/cli.js +++ b/tools/node_modules/eslint/lib/cli.js @@ -81,15 +81,23 @@ function translateOptions(cliOptions) { */ function printResults(engine, results, format, outputFile) { let formatter; + let rules; try { formatter = engine.getFormatter(format); + rules = engine.getRules(); } catch (e) { log.error(e.message); return false; } - const output = formatter(results); + const rulesMeta = {}; + + rules.forEach((rule, ruleId) => { + rulesMeta[ruleId] = rule.meta; + }); + + const output = formatter(results, { rulesMeta }); if (output) { if (outputFile) { |