Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
run: npm run lint

- name: Run Prettier
run: npm run lint:prettier:ci
run: npm run lint:prettier

- name: Run License Checker
run: npm run lint:licenses
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint:prettier:ci && npm run lint:licenses && npm test
npm run lint:prettier && npm run lint:licenses && npm test
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Before submitting a pull request back to the main repository, please make sure y

1. Pull request base branch is set to `main`. All pull requests should be forked from and merged back to `main`
2. Run `npm test` to check the code adheres to the defined ESLint style and that it passes the Jest tests
3. Run `npm run lint:prettier` to run the Prettier code formatter over the code
3. Run `npm run lint:prettier:fix` to run the Prettier code formatter over the code
4. Run `npm run lint:licenses` if adding or updating production dependencies to check they use permissive licenses

Steps 2. and 4. are automatically run by a pre-commit hook added by [Husky](https://typicode.github.io/husky/#/).
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"jest:coverage": "jest --coverage",
"lint": "eslint . --cache --ext js,jsx --ignore-path .gitignore",
"lint:licenses": "node scripts/license-checker.js",
"lint:prettier": "prettier . -w -u",
"lint:prettier:ci": "prettier . -c -u",
"lint:prettier": "prettier . -c -u",
"lint:prettier:fix": "prettier . -w -u",
"prepare": "husky install",
"test": "npm run lint && npm run jest"
},
Expand Down