-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
Description
User story
Generating code-pushup.config.{js,mjs,ts} file is a basic requirement of the setup wizard.
Outputs
JavaScript (ESM)
/** @type {import('@code-pushup/models').CoreConfig} */
export default {
plugins: [
// ...
],
};TypeScript
import type { CoreConfig } from '@code-pushup/models';
const config: CoreConfig = {
plugins: [
// ...
],
};
export default config;Acceptance criteria
- The user can select whether to use JavaScript or TypeScript for their config file(s).
- The default option is inferred from the file system. If a
tsconfig.jsonortsconfig.*.jsonis present in the root directory, then TypeScript is the default, otherwise it's JavaScript. - If JavaScript is selected, then the
.jsextension should only be used if the rootpackage.json(if any) contains"type": "module". Otherwise, the.mjsextension should be used.
Reactions are currently unavailable