Skip to content

Commit

Permalink
build(knip): 👷 add actions & update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
navin-moorthy committed Mar 29, 2023
1 parent facef3a commit 6d971fb
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 9 deletions.
14 changes: 11 additions & 3 deletions .github/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- [Stylelint](#stylelint)
- [Markdown](#markdown)
- [Check Types](#check-types)
- [Check unused dependencies, exports \& types](#check-unused-dependencies-exports--types)
- [Check Spelling](#check-spelling)
- [Check package.json](#check-packagejson)
- [Test](#test)
Expand All @@ -27,9 +28,7 @@ Before you get started, you will need to have the following tools installed on
your machine:

- **[Node.js](https://nodejs.org/en/)** (version 12 or later)
- **[pnpm](https://pnpm.io/)** (version 5 or later) or
**[npm](https://www.npmjs.com/)** or **[yarn](https://yarnpkg.com/)** (version
6 or later)
- **[pnpm](https://pnpm.io/)** (version 7 or later)
- **[Git](https://git-scm.com/)** (optional, but recommended for version
control)

Expand Down Expand Up @@ -173,6 +172,15 @@ Markdown files
`pnpm lint:types`

### Check unused dependencies, exports & types

([knip](https://github.com/webpro/knip)): Checks all unused dependencies,
exports & types

> Check the spelling errors
`pnpm lint:knip`

### Check Spelling

([cspell](https://cspell.org)): Spell checks across all source files
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/lint-knip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Check for unused dependencies, exports and types

on:
pull_request: ~

push:
branches:
- main

jobs:
knip:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/prepare
- run: pnpm lint:knip
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,25 @@ Built using the [Next.js framework](https://nextjs.org/) and written in
TypeScript & other amazing technologies mentioned below to build a modern web
application.

- [react](https://reactjs.org/)
- [next.js](https://nextjs.org/)
- [react](https://reactjs.org/)
- [typeScript](https://www.typescriptlang.org/)
- [zod](https://github.com/colinhacks/zod)
- [tailwindcss](https://tailwindcss.com/)
- [next-sitemap](https://github.com/iamvishnusankar/next-sitemap)
- [pnpm](https://pnpm.io/)
- [eslint](https://eslint.org/)
- [prettier](https://prettier.io/)
- [stylelint](https://stylelint.io/)
- [jest](https://jestjs.io/)
- [react-testing-library](https://testing-library.com/docs/react-testing-library/intro/)
- [next-sitemap](https://github.com/iamvishnusankar/next-sitemap)
- [pnpm](https://pnpm.io/)
- [markdownlint](https://github.com/DavidAnson/markdownlint)
- [knip](https://github.com/webpro/knip)
- [cspell](https://cspell.org)
- [npm-package-json-lint](https://npmpackagejsonlint.org/)
- [release-it](https://github.com/release-it/release-it#readme)
- [husky](https://typicode.github.io/husky/#/)
- [lint-staged](https://github.com/okonet/lint-staged#readme)
- [commitlint](https://commitlint.js.org/#/)
- [gacp](https://github.com/vivaxy/gacp#readme)
- [release-it](https://github.com/release-it/release-it#readme)

## Development

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"lint:types": "tsc --noEmit",
"lint:css": "stylelint '**/*.css' --cache --color -f verbose",
"lint:md": "markdownlint **/*.md \".github/**/*.md\"",
"lint:knip": "knip --production",
"lint:package-json": "npmPkgJsonLint .",
"lint:spelling": "cspell --dot --gitignore --cache --no-progress check \"**/*\"",
"format": "npm-run-all format:*",
Expand Down

0 comments on commit 6d971fb

Please sign in to comment.