diff --git a/CHANGELOG.md b/CHANGELOG.md index 69a5f3fc..0912eb24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Unreleased +- Add `prettier:fix` and `prettier:check` npm scripts - Fix garbled text copying in Chrome/Edge for PDFs with >256 unique characters (#1659) - Fix Link accessibility issues - Fix Table Accessibility Issue: Operator CS/cs not allowed in this current state diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cc08bba7..af317a68 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -71,10 +71,11 @@ Test commands * `npm run test:unit`: Run unit tests * `npm run test:visual`: Run visual tests * `npm run lint`: Run linter +* `npm run prettier:fix`: Run prettier To write new tests, look for the *.spec.js files at `test/unit` and `test/visual` as examples -> Visual tests should use an embedded font, instead of system fonts, to ensure uniform rendering between different environments +> Visual tests should use an embedded font, instead of system fonts, to ensure uniform rendering between different environments. In addition it should only have 1 test per file. ## Documentation diff --git a/package.json b/package.json index 172638d5..15014d45 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,8 @@ "docs": "npm run pdf-guide && npm run website && npm run browserify-example", "lint": "eslint {lib,tests}/**/*.js", "prettier": "prettier lib tests docs", + "prettier:fix": "prettier --write lib tests docs", + "prettier:check": "prettier --check lib tests docs", "test": "jest", "test:visual": "jest visual/", "test:unit": "jest unit/"