Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Formatting TypeScript

Formatting TypeScript

We Are Javascritpters #13

More Decks by Taketoshi Aono(青野健利 a.k.a brn)

Other Decks in Programming


  1. #!/bin/sh! ! for file in $(git diff --cached --name-only --diff-

    filter=ACM | grep '\.tsx\?$' | tr '\n' ' ')! do! echo "prettier $file";! # Prettify all staged .js files! ./node_modules/.bin/tslint $file -c ./tslint.json -- exclude 'src/**/*.css' --project tsconfig.json --fix! ! # Add back the modified/prettified files to staging! git add $file! ! done!