0.2.0 • Published 9 months ago

depslint v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

depslint

A dependency linter

npm-badge actions-badge types-badge

A npm dependency linter built on depcheck.

Fixes missing or unused packages in package.json.

Installation

npm install -g depslint

Usage

"source" and "test" can be optionally specified. These must be relative to "dirname" where a package.json file must be found.

  Usage: depslint [options] [directory]

  Options:
  -v, --version           Show version number
  -h, --help              Show this help message
  -s, --source [dirname]  Specify source directory
  -t, --test [dirname]    Specify test directory
  -i, --ignore [packages] Ignore unused packages
      --fix               Fix package.json in directory
      --json              JSON output if missing or removable packages are detected

API

import { depslint } from 'depslint'
const options = {
  cwd: process.cwd(),
  src: 'src',
  test: '',
  ignores: ['rimraf'],
  fix: true
}
const { missing, unused } = await depslint(options)

Contribution and License Agreement

If you contribute code to this project, you are implicitly allowing your code to be distributed under the MIT license. You are also implicitly verifying that all code is your original work or correctly attributed with the source of its origin and license.

License

MIT License

0.2.0

9 months ago

0.1.1

9 months ago

0.0.0

9 months ago