Contributing and maintaining OSS projects can be boosted :rocket: through a set of tools :hammer: and processes :gear:. This package provides generators for Nx and Angular to configure a variety of those tools with just a command, integrating without any friction with your existing repo. Check the documentation to see all available features.
npm install --save-dev @nx-squeezer/workspace
Recommended order to setup all the generators:
Example :nx g @nx-squeezer/workspace:prettier
nx g @nx-squeezer/workspace:eslint
nx g @nx-squeezer/workspace:tsconfig
nx g @nx-squeezer/workspace:lint-staged
nx g @nx-squeezer/workspace:contributors
nx g @nx-squeezer/workspace:github-workflow
nx g @nx-squeezer/workspace:codecov
Setup command:
Example :nx g @nx-squeezer/workspace:codecov
Adds codecov
to a project to have coverage information, including:
.codecov.yml
.test
target to expose coverage information.Setup command:
Example :nx g @nx-squeezer/workspace:commitlint
Uses commitlint
and husky
to lint commit messages to adhere to conventional commits. It uses the default configuration provided by @commitlint/config-conventional.
Setup command:
Example :nx g @nx-squeezer/workspace:contributors
Adds contributors attribution to README.md
using contrib.rocks
.
Setup command, which will prompt one by one the set of rules that can be added:
Example :nx g @nx-squeezer/workspace:eslint
Adds a set of ESLint rules to enhance code style in projects. Shipped as a generator instead of a configuration package so that it can be customized and edited by repo, and to automate the configuration of projects with TypeScript. Additionally, since it is an Nx plugin it can automatically apply upgrade changes if needed. The rules that it adds include:
eslint:recommended
sonarjs/recommended
unused-imports
@typescript-eslint/recommended
deprecation
import/recommended
Setup command:
Example :nx g @nx-squeezer/workspace:github-workflow
Adds a GitHub Action workflow to automate the CI pipeline for your repo. It includes the following actions:
build
, test
, lint
, e2e
.nx.json
.README.md
.Options:
--force
(default false
).--branch=master
(default main
).--useNxCloud
(default true
).Setup command:
Example :nx g @nx-squeezer/workspace:lint-staged
Uses lint-staged
and husky
to lint files when being committed to the repo.
Setup command:
Example :nx g @nx-squeezer/workspace:prettier
Updates prettier
configuration with some defaults, and adds prettier/recommended
rule to ESLint configuration.
Setup command:
Example :nx g @nx-squeezer/workspace:tsconfig
Updates the tsconfig.json
file adding a default configuration with stricter options enabled.