Skip to content

Instantly share code, notes, and snippets.

@johntran
Created January 17, 2018 20:05
Show Gist options
  • Save johntran/047a3811f1d216d97a1f7014cf3fc052 to your computer and use it in GitHub Desktop.
Save johntran/047a3811f1d216d97a1f7014cf3fc052 to your computer and use it in GitHub Desktop.
{
"scripts": {
"lint": "eslint server",
"lint:fix": "npm run lint -- --fix",
"prettier":
"./node_modules/.bin/prettier --single-quote --trailing-comma all --write \"{,!(node_modules|build|dist|flow-typed)/**/}*.js\"",
"prettierTS":
"./node_modules/.bin/prettier --single-quote --trailing-comma all --write \"{,!(node_modules|build|dist|flow-typed)/**/}*.ts\"",
"prettierTSX":
"./node_modules/.bin/prettier --single-quote --trailing-comma all --write \"{,!(node_modules|build|dist|flow-typed)/**/}*.tsx\"",
"prettierPackageJSON":
"./node_modules/.bin/prettier --single-quote --trailing-comma all --write \"package.json\"",
"precommit": "./node_modules/.bin/lint-staged"
},
"lint-staged": {
"*.js": ["npm run prettier", "git add"],
"*.ts": ["npm run prettierTS", "git add"],
"*.tsx": ["npm run prettierTSX", "git add"],
"package.json": ["npm run prettierPackageJSON", "git add"]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment