@magic/format

@magic/format

run prettier and format your code.

install

be in a nodejs project.

npm i --save-dev --save-exact @magic/format

Usage

npm run scripts

Add the @magic/test bin scripts to package.json

{  "scripts": {    "format": "f -w",    "format:check": "f"  },  "devDependencies": {    "@magic/format": "0.0.1"  }}

then use the npm run scripts

npm run formatnpm run format:check

cli

// first install globallynpm i -g @magic/format// check formatting using prettier but do not write// prettier --list-differentf// format files using prettier// prettier --writef -w