ts-add-js-extension
Version:
Add .js extension to each relative ESM import and export statement in JavaScript file
25 lines • 915 B
JavaScript
/**
* @deprecated since version 1.4.0
* Will be deleted in version 2.0
* There is no need to parse config with this function
* As configurations can be passed directly
* Using this function will halt the program
* And requires you to write configs directly
* */
const parseConfig = (_) => {
throw new Error([
`Function parseConfig should not be used, this function exists because of "yargs"`,
`Now yargs is removed, cli arguments parser is hand-written`,
].join('\n'));
};
const normaliseConfig = (config) => {
return {
dir: config.dir,
// eslint-disable-next-line @typescript-eslint/no-deprecated
showProgress: config.showProgress ?? config.showChanges ?? true,
// eslint-disable-next-line @typescript-eslint/no-deprecated
include: config.include ?? [],
};
};
export { normaliseConfig, parseConfig };
//# sourceMappingURL=config.js.map