@nx-squeezer/workspace v6.0.4
@nx-squeezer/workspace
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.
Setup
npm install --save-dev @nx-squeezer/workspaceRecommended order to setup all the generators:
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:codecovGenerators
codecov
Setup command:
nx g @nx-squeezer/workspace:codecovAdds codecov to a project to have coverage information, including:
- Generating configuration file
.codecov.yml. - Configures individual projects with
testtarget to expose coverage information. - Updates CI file to upload coverage report.
- Adds badge to README.md.
commitlint
Setup command:
nx g @nx-squeezer/workspace:commitlintUses commitlint and husky to lint commit messages to adhere to conventional commits. It uses the default configuration provided by @commitlint/config-conventional.
contributors
Setup command:
nx g @nx-squeezer/workspace:contributorsAdds contributors attribution to README.md using contrib.rocks.
eslint
Setup command, which will prompt one by one the set of rules that can be added:
nx g @nx-squeezer/workspace:eslintAdds 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:recommendedsonarjs/recommendedunused-imports@typescript-eslint/recommendeddeprecationimport/recommended
github-workflow
Setup command:
nx g @nx-squeezer/workspace:github-workflowAdds a GitHub Action workflow to automate the CI pipeline for your repo. It includes the following actions:
- Checkout.
- Setup Node.
- Install dependencies.
- Targets for
build,test,lint,e2e. - Configure
nx.json. - Workflow adapted to Nx workspaces.
- Add a badge to
README.md.
Options:
- Force overwriting of workflow with
--force(defaultfalse). - Provide default branch with
--branch=master(defaultmain). - Use Nx Cloud
--useNxCloud(defaulttrue).
lint-staged
Setup command:
nx g @nx-squeezer/workspace:lint-stagedUses lint-staged and husky to lint files when being committed to the repo.
prettier
Setup command:
nx g @nx-squeezer/workspace:prettierUpdates prettier configuration with some defaults, and adds prettier/recommended rule to ESLint configuration.
tsconfig
Setup command:
nx g @nx-squeezer/workspace:tsconfigUpdates the tsconfig.json file adding a default configuration with stricter options enabled.
Contributors
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago