From 89f4915746fe0d30b0ac588b51567b5f91f49232 Mon Sep 17 00:00:00 2001 From: Justin Spears Date: Tue, 24 Feb 2026 13:13:31 -0800 Subject: [PATCH 1/5] add prettier --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cc08bba78..1c7190b8b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -71,6 +71,7 @@ Test commands * `npm run test:unit`: Run unit tests * `npm run test:visual`: Run visual tests * `npm run lint`: Run linter +* `npm run prettier`: Run prettier To write new tests, look for the *.spec.js files at `test/unit` and `test/visual` as examples From ea684ff3a890031e642cae0ef9a73499034b55fe Mon Sep 17 00:00:00 2001 From: Justin Spears Date: Tue, 24 Feb 2026 13:15:29 -0800 Subject: [PATCH 2/5] add convience commands --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index 172638d52..15014d450 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/" From 90bd197994198dabd9f4afe578d9c83ee487ee4c Mon Sep 17 00:00:00 2001 From: Justin Spears Date: Tue, 24 Feb 2026 13:15:55 -0800 Subject: [PATCH 3/5] fix command --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1c7190b8b..4f219d7de 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -71,7 +71,7 @@ Test commands * `npm run test:unit`: Run unit tests * `npm run test:visual`: Run visual tests * `npm run lint`: Run linter -* `npm run prettier`: Run prettier +* `npm run prettier:fix`: Run prettier To write new tests, look for the *.spec.js files at `test/unit` and `test/visual` as examples From 09e88e57ba5caef1f8fd987581b1f24c9b18e7d5 Mon Sep 17 00:00:00 2001 From: Justin Spears Date: Tue, 24 Feb 2026 13:18:10 -0800 Subject: [PATCH 4/5] update --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4f219d7de..af317a68f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -75,7 +75,7 @@ Test commands 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 From 9ba7c4aeb776675610cd044e4c5a9831acf7c079 Mon Sep 17 00:00:00 2001 From: Justin Spears Date: Tue, 24 Feb 2026 13:23:04 -0800 Subject: [PATCH 5/5] docs: update changelog for prettier scripts --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69a5f3fc9..0912eb24b 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