-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
🦾 CI/CDcontinuous integration and deploymentcontinuous integration and deployment🧩 eslint-config🧹 maintenanceThis doesn't seem rightThis doesn't seem right
Description
Motivation
To enable users to run npm init @code-pushup/eslint-config, we need to publish our setup wizard as a new @code-pushup/create-eslint-config package. Since we need to keep the setup logic in sync with @code-pushup/eslint-config, it would be best to maintain them together in the same repository.
Recommended Nx commands
Nx provides various commands to automate some of the initial migration. It is recommended to run these generators first and commit them separately, before making manual fixes and other changes.
npx nx@latest init- Sets up Nx in an existing repo.
- Use Guided setup.
npx nx g @nx/workspace:convert-to-monorepo- Converts standalone repo to monorepo.
- Moves
@code-pushup/eslint-configfrom root topackages.
npx nx g @nx/js:library- Generates a new publishable library.
- Use options
--directory=packages/create-eslint-config --importPath=@code-pushup/create-eslint-config --linter=eslint --publishable=true --unitTestRunner=vitest --useProjectJson=true.
Acceptance criteria
- The
code-pushup/eslint-configrepository is converted to a monorepo with 2 packages -@code-pushup/eslint-config(existing) and@code-pushup/create-eslint-config(new). - Nx is used to orchestrate tasks in the new monorepo.
- Current scripts in
package.jsonare converted into Nx targets for theeslint-configproject.- Cache is configured for each target (except for
test:watchandrelease), including cache outputs where applicable (test:coverage,docs).
- Cache is configured for each target (except for
- Vitest is set up to run unit tests for both packages.
- ESLint is set up for both packages; the config is "dogfooded".
- TypeScript strict compilation is enforced for both packages. (Supports
.jsfiles with JSDocs as an alternative to.tsfiles.) - The CI/CD pipeline checks affected projects on each PR.
- Documentation is updated for the monorepo structure.
- The
@code-pushup/eslint-configMarkdown docs are generated as before. - The monorepo's root README links to the
@code-pushup/eslint-configREADME. - The
@code-pushup/create-eslint-configpackage is only mentioned as "coming soon" for now. - A
CONTRIBUTING.mdis added to the monorepo.
- The
- Nx releases are configured in place of
release-it.- Both packages are to be published together under the same version - i.e., fixed releases, not independent.
- Conventional commits are used to determine the next version and changelog.
- Commit messages are linted with Commitlint, with the scope matching Nx projects. Commitizen is also set up to use the same configuration. (This setup can be copied from the
code-pushup/clirepo.)
- Commit messages are linted with Commitlint, with the scope matching Nx projects. Commitizen is also set up to use the same configuration. (This setup can be copied from the
- GitHub releases are created as an artifact.
- Releases will be triggered manually for now. They will later be automated in CI/CD releases for eslint-config packages #48.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
🦾 CI/CDcontinuous integration and deploymentcontinuous integration and deployment🧩 eslint-config🧹 maintenanceThis doesn't seem rightThis doesn't seem right