Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rename lint:prettier scripts to reflect their function #303

Merged
merged 1 commit into from
Jul 20, 2023
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
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,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