@cspell/cspell-tools
Version:
Tools to assist with the development of cSpell
13 lines • 389 B
JavaScript
import * as path from 'node:path';
export function normalizeConfig(cfg) {
if (!cfg)
return cfg;
const dir = path.dirname(cfg.filepath);
const config = cfg.config;
const result = { ...config, rootDir: path.resolve(dir, config.rootDir || '.') };
return {
config: result,
filepath: cfg.filepath,
};
}
//# sourceMappingURL=normalizeConfig.js.map