Skip to content

Commit

Permalink
Used lint-staged to run Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
simison committed Jan 4, 2020
1 parent eaad125 commit 66ebc1e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 119 deletions.
50 changes: 0 additions & 50 deletions bin/pre-commit-hook.js

This file was deleted.

47 changes: 0 additions & 47 deletions bin/prettify-files.js

This file was deleted.

20 changes: 0 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"migrate-down": "migrate down",
"migrate": "migrate up",
"postshrinkwrap": "node -e \"fs.utimesSync('./node_modules', new Date(), new Date());\"",
"reformat-files": "node ./bin/prettify-files.js",
"reformat-files": "prettier --insert-pragma --require-pragma=false --ignore-path .eslintignore --write",
"preseed": "npm run check-environment",
"prestart": "npm run check-environment",
"seed:messages": "node ./bin/fillTestData/Messages.js",
Expand Down Expand Up @@ -257,7 +257,13 @@
"license": "MIT",
"husky": {
"hooks": {
"pre-commit": "npm run -s install-dependencies && node bin/pre-commit-hook.js"
"pre-commit": "npm run -s install-dependencies && npx lint-staged"
}
},
"lint-staged": {
"*.js": [
"npm run reformat-files",
"git add"
]
}
}

0 comments on commit 66ebc1e

Please sign in to comment.