Skip to content

Commit

Permalink
chore: rename lint:prettier scripts to reflect their function (#520)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Jul 20, 2023
1 parent d005cdf commit b6d14c1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
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
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@
"node": ">=14.0.0"
},
"scripts": {
"build": "tsc && jsdoc2md src/index.js > API.md && npm run lint:prettier",
"build": "tsc && jsdoc2md src/index.js > API.md && npm run lint:prettier:fix",
"jest": "jest",
"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

0 comments on commit b6d14c1

Please sign in to comment.