JS Code Stats
npm install -g js-code-stats # or --save
JS Code Stats search your codebase and notify you of,
- Invalid imports
- Unused files
- Unused exports
CLI
js-code-stats ./src/**/*.js
File test/invalid-import/b.js attempted to import invalid imports: b
File test/invalid-import/a.js was never imported
File test/invalid-import/a.js defined unused exports: b
File test/invalid-import/b.js defined unused exports: default
You can specify to ignore unused exports exports from files using the ignore-unused-exports
or -i
option.
JS API
; ;
ignoreUnusedExports
is the same as before.
Other options defined in get-es-imports-exports