Perform dead code analysis with Knip (#2575)

* Install Knip

* Clarify an import that was confusing Knip

* Fix issues detected by Knip

Including cleaning up some unused code and dependencies, using a React hook that we unintentionally stopped using, and also adding some previously undeclared dependencies.

* Run dead code analysis in lint script and CI

---------

Co-authored-by: Timo <toger5@hotmail.de>
This commit is contained in:
Robin
2024-08-27 20:06:57 -04:00
committed by GitHub
parent 51ae4c0a88
commit 7bca541cb6
20 changed files with 271 additions and 774 deletions

View File

@@ -23,3 +23,5 @@ jobs:
run: "yarn run lint:eslint"
- name: Type check
run: "yarn run lint:types"
- name: Dead code analysis
run: "yarn run lint:knip"

View File

@@ -21,7 +21,8 @@ jobs:
run: "yarn run test:coverage"
- name: Upload to codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true