Skip to content
folder

GitHub Action

npm unused packages checker

v1 Latest version

npm unused packages checker

folder

npm unused packages checker

check all dependencies are used in the code

Installation

Copy and paste the following snippet into your .yml file.

              

- name: npm unused packages checker

uses: Amr-Reda/npm-unused-packages-checker@v1

Learn more about this action in Amr-Reda/npm-unused-packages-checker

Choose a version

NPM Unused Packages Checker Action

Github action check for dependencies in package.json that not used in the code.

Inputs

IGNORE_PATTERNS

Optional List of Glob patterns for paths to ignore. Default [].

IGNORE_PACKAGES

Optional List of packages that exist in package.json and not used in the code to ignore and mark them as used. Default [].

Outputs

NOT_USED_PACKAGES

List of packages in package.json and not used in the code.

Example usage

- uses: actions/checkout@v1
- name: packages check
  uses: Amr-Reda/npm-unused-packages-checker@v1
  with:
    IGNORE_PACKAGES:  '["jade"]'
    IGNORE_PATHS:  '["/test"]'

TODO:

  • Generate pull request to remove unused package from package.json