Skip to content

Commit

Permalink
Chore: improve perf test (#11756)
Browse files Browse the repository at this point in the history
it removed something in created config for perf test:
a. rule config for deprecated rules
b. index, utils. the result of ls() includes index.js and utils/* while they are not rules, that's say, it's not a 'valid' config
  • Loading branch information
aladdin-add authored and kaicataldo committed May 25, 2019
1 parent 45bd336 commit 0a801d7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ const lodash = require("lodash"),
ejs = require("ejs"),
loadPerf = require("load-perf"),
yaml = require("js-yaml"),
{ CLIEngine } = require("./lib/cli-engine");
{ CLIEngine } = require("./lib/cli-engine"),
builtinRules = require("./lib/rules/index");

const { cat, cd, cp, echo, exec, exit, find, ls, mkdir, pwd, rm, test } = require("shelljs");

Expand Down Expand Up @@ -959,7 +960,9 @@ function createConfigForPerformanceTest() {
"rules:"
];

content.push(...ls("lib/rules").map(fileName => ` ${path.basename(fileName, ".js")}: 1`));
for (const [ruleId] of builtinRules) {
content.push(` ${ruleId}: 1`);
}

content.join("\n").to(PERF_ESLINTRC);
}
Expand Down

0 comments on commit 0a801d7

Please sign in to comment.