Skip to content

feat(create-eslint-config): implement setup wizard#51

Merged
hanna-skryl merged 11 commits into
mainfrom
setup-wizard
Apr 27, 2026
Merged

feat(create-eslint-config): implement setup wizard#51
hanna-skryl merged 11 commits into
mainfrom
setup-wizard

Conversation

@hanna-skryl
Copy link
Copy Markdown
Collaborator

Partially addresses #47

Summary

  • Interactive setup wizard for @code-pushup/eslint-config, triggered via npm init @code-pushup/eslint-config or imported programmatically
  • Detects project state (deps, files, tsconfig, node version, existing eslint config) and pre-selects recommended configs
  • Generates eslint.config.mjs (or .js for type: "module" projects) with preset inheritance
  • Installs all required peer dependencies via the detected package manager
  • Supports --yes, --configs, --tsconfig, --node-version-source, --node-version, and --dry-run CLI flags
  • Full README with usage, options table, programmatic API, and available configs

Note

Merging into existing eslint.config.* files is not yet implemented. The wizard prints a snippet for the user to paste manually. Handling defineConfig and tseslint.config wrappers will ship in a follow-up. Relevant code is marked with TODO comments.

@hanna-skryl hanna-skryl self-assigned this Apr 16, 2026
@hanna-skryl hanna-skryl marked this pull request as ready for review April 16, 2026 20:14
@hanna-skryl hanna-skryl requested a review from matejchalk April 16, 2026 20:14
Comment thread packages/create-eslint-config/src/lib/wizard.ts
Comment thread packages/create-eslint-config/src/lib/config-registry.ts
Comment thread packages/create-eslint-config/src/lib/codegen.ts Outdated
Comment thread packages/create-eslint-config/src/lib/utils.spec.ts
Comment thread packages/create-eslint-config/src/lib/utils.spec.ts
Comment thread packages/create-eslint-config/src/cli.ts
Comment thread packages/create-eslint-config/src/test-setup.ts
Comment thread packages/create-eslint-config/package.json
Comment thread package.json Outdated
Comment thread packages/create-eslint-config/package.json Outdated
@hanna-skryl hanna-skryl requested a review from matejchalk April 23, 2026 19:55
Comment thread packages/create-eslint-config/src/lib/config-registry.spec.ts Outdated
Comment thread packages/create-eslint-config/src/lib/config-registry.ts
Comment thread packages/create-eslint-config/src/lib/config-registry.ts Outdated
Comment thread packages/create-eslint-config/src/lib/eslint-config-source.ts Outdated
Comment thread packages/create-eslint-config/eslint.config.js Outdated
Comment thread packages/create-eslint-config/eslint.config.js Outdated
Comment thread packages/create-eslint-config/eslint.config.js Outdated
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
@hanna-skryl hanna-skryl merged commit 34211e7 into main Apr 27, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants