CLI tools for JavaScript
npm install @superdispatch/js-tools
#### Installation
``bash`
yarn add @superdispatch/js-tools -D
#### Usage
`sh-session`
$ npm install -g @superdispatch/js-tools
$ js-tools COMMAND
running command...
$ js-tools (-v|--version|version)
@superdispatch/js-tools/0.13.1 linux-x64 node-v20.19.1
$ js-tools --help [COMMAND]
USAGE
$ js-tools COMMAND
...
##### With lint-staged:
`js`
module.exports = { '*': 'js-tools lint --fix' };
#### Commands
- js-tools lint
- js-tools lint:eslint
- js-tools lint:prettier
- js-tools lint:yarn-deduplicate
Run all linters
`
USAGE
$ js-tools lint
OPTIONS
--cache Only check changed files
--fix Run auto-fixes
--help show CLI help
--maxWarnings=maxWarnings [default: -1] Maximum number of warnings after which the command will exit with a non-zero
exit code
--quiet Do not emit warnings
EXAMPLES
$ js-tools lint --fix
$ js-tools lint --quiet
$ js-tools lint foo.js bar.js
`
_See code: dist/commands/lint/index.js_
Run ESLint
`
USAGE
$ js-tools lint:eslint
OPTIONS
--cache Only check changed files
--fix Run auto-fixes
--help show CLI help
--maxWarnings=maxWarnings [default: -1] Maximum number of warnings after which the command will exit with a non-zero
exit code
--quiet Do not emit warnings
EXAMPLES
$ js-tools lint --fix
$ js-tools lint --quiet
$ js-tools lint foo.js bar.js
`
_See code: dist/commands/lint/eslint.js_
Run Prettier
`
USAGE
$ js-tools lint:prettier
OPTIONS
--cache Only check changed files
--fix Run auto-fixes
--help show CLI help
--maxWarnings=maxWarnings [default: -1] Maximum number of warnings after which the command will exit with a non-zero
exit code
--quiet Do not emit warnings
EXAMPLES
$ js-tools lint --fix
$ js-tools lint --quiet
$ js-tools lint foo.js bar.js
`
_See code: dist/commands/lint/prettier.js_
Deduplicate yarn dependencies
`
USAGE
$ js-tools lint:yarn-deduplicate
OPTIONS
--cache Only check changed files
--fix Run auto-fixes
--help show CLI help
--maxWarnings=maxWarnings [default: -1] Maximum number of warnings after which the command will exit with a non-zero
exit code
--quiet Do not emit warnings
EXAMPLES
$ js-tools lint --fix
$ js-tools lint --quiet
$ js-tools lint foo.js bar.js
``
_See code: dist/commands/lint/yarn-deduplicate.js_