Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: added a CI step to detect unused dependencies #592

Merged
merged 11 commits into from
Jun 18, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,20 @@ jobs:
fail-on-severity: high
allow-licenses: MIT, Apache-2.0, BSD-3-Clause, ISC, BSD-2-Clause, Unlicense, CC0-1.0, 0BSD, X11, MPL-2.0, MPL-1.0, MPL-1.1, MPL-2.0
fail-on-scopes: development, runtime
allow-dependencies-licenses: 'pkg:npm/caniuse-lite'
allow-dependencies-licenses: 'pkg:npm/caniuse-lite'
- name: 'Setup Node.js'
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: 'Install dependencies'
JamieSlome marked this conversation as resolved.
Show resolved Hide resolved
run: npm install
- name: 'Install depcheck globally'
JamieSlome marked this conversation as resolved.
Show resolved Hide resolved
run: npm install -g depcheck
- name: 'Run depcheck'
run: |
npx depcheck --skip-missing --ignores="@babel/*,@commitlint/*,eslint-*,husky,mocha"
echo $?
if [[ $? == 1 ]]; then
echo "Unused dependencies or devDependencies found."
exit 1
fi
Loading