scripts

A Node.js command-line utility that allows web developers to improve the overall code styling and enforce some standards and best practices.

Installation#

npm install @iqmetrix/scripts --save-dev

Usage#

The main command is iq-web-scripts but there is a short/alias as iqws

npx hub-dev-server <command> <option>

Or add a script to your packages.json

"command": "iqws <command> <option>"

CLI Options#

lint run ESLint for all files in the project (add --write to apply the fixes)
linc run ESLint for modified files only in the project (add --write to apply the fixes)
prettier run Prettier check for all files in the project
Additional Options:
check-changed run Prettier check for modified files only in the project
write run Prettier and fix styling for all files in the project
write-changed run Prettier and fix styling for modified files only in the project

Using each command#

  • iqws lint: run ESLint for all files in the project
  • iqws lint write: run ESLint for all files and fix the code when possible in the project
  • iqws linc: run ESLint for modified files only in the project
  • iqws linc write: run ESLint for modified files only and fix the code when possible in the project
  • iqws prettier: run Prettier check for all files in the project
  • iqws prettier check-changed: run Prettier check for modified files only in the project
  • iqws prettier write: run Prettier and fix styling for all files in the project
  • iqws prettier write-changed: run Prettier and fix styling for modified files only in the project
  • iqws -h: show list of commands
  • iqws -v: show version
Last updated on by Paulo Andrade