Skip to content

Commit a6f46f7

Browse files
committed
fix(config): fix exposed configs being invalid because of new attributes
1 parent f896eac commit a6f46f7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/config.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@ const { prefixConfigRules } = require("./plugins");
44

55
// Very heavy-handed, and likely brittle for a million reasons.
66
// This is just a test to see what happens, don't do this at home.
7-
const getComputedConfig = (config) => {
7+
const getComputedConfig = (baseConfig) => {
88
const cli = new CLIEngine({
99
useEslintrc: false,
1010
allowInlineConfig: false,
11-
baseConfig: config,
11+
baseConfig,
1212
});
1313

14-
return cli.getConfigForFile("index.js");
14+
const config = cli.getConfigForFile("index.js");
15+
delete config.filePath;
16+
delete config.baseDirectory;
17+
18+
return config;
1519
};
1620

1721
// Wraps a given config object with the right dependencies for consumption

0 commit comments

Comments
 (0)