CARVIEW |
Select Language
HTTP/2 200
date: Sat, 26 Jul 2025 03:48:47 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/formatjs/formatjs.git
etag: W/"ac65ff25149069d8af41ee27c8118271"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=CdKTIgIUaVDgCNcrZ5ldoOSWD9FxBUErQip9nSMvvBpo6YbyoWCr%2BX8jfXjJv59jX4%2Bc5h6kJNvGrz9cSKuCxYv8O5qF9etntOQ0jnjYngJ4WkNpbOPEyxjBt9Ot4%2BuPYdayJ5x%2F2a2amH50qwOpyI9xtF1uAjtzRU%2B9vM9po5fAaLCDWPV%2Fcrt9ffygCU1MADJwKYsBpfk9Qsp6H3QuxhyzvIKycH3qpVXybiCQG4b3%2FKHrWdrAOc8pmsMfmETElDqHXMSHyEmLXk7N3CS0BA%3D%3D--Pz%2FBmuqZkms6%2Brtz--OHO5FPZHeVf7opMT4kAVDA%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1374919703.1753501726; Path=/; Domain=github.com; Expires=Sun, 26 Jul 2026 03:48:46 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sun, 26 Jul 2026 03:48:46 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 8CB4:178C3F:1234BD:1BDD9E:6884501E
feat(eslint-plugin-formatjs): support tagged template expression like… · formatjs/formatjs@be97996 · GitHub
Copy file name to clipboardExpand all lines: packages/eslint-plugin-formatjs/tests/enforce-default-message.test.ts
Copy file name to clipboardExpand all lines: packages/eslint-plugin-formatjs/util.ts
Copy file name to clipboardExpand all lines: packages/ts-transformer/src/transform.ts
Copy file name to clipboardExpand all lines: packages/ts-transformer/tests/fixtures/templateLiteral.tsx
Copy file name to clipboardExpand all lines: packages/ts-transformer/tests/index.test.ts
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit be97996
authored
feat(eslint-plugin-formatjs): support tagged template expression like dedent (#5016)
# feat(@formatjs/ts-transformer): support tagged template expression like dedent
This PR adds support for tagged template expressions (like `dedent`) in message descriptors for both the ESLint plugin and TS transformer. Now you can use tagged template literals like `dedent` to format your messages while maintaining proper extraction and validation.
The implementation handles tagged templates in:
- JSX expressions
- Object properties
- Template literals
fixes #50151 parent 3fc34d7 commit be97996Copy full SHA for be97996
File tree
Expand file treeCollapse file tree
5 files changed
+108
-9
lines changedFilter options
- packages
- eslint-plugin-formatjs
- tests
- ts-transformer
- src
- tests
- fixtures
Expand file treeCollapse file tree
5 files changed
+108
-9
lines changedpackages/eslint-plugin-formatjs/tests/enforce-default-message.test.ts
Copy file name to clipboardExpand all lines: packages/eslint-plugin-formatjs/tests/enforce-default-message.test.ts+8Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
26 | 32 |
| |
27 | 33 |
| |
28 | 34 |
| |
| 35 | + | |
| 36 | + | |
29 | 37 |
| |
30 | 38 |
| |
31 | 39 |
| |
|
packages/eslint-plugin-formatjs/util.ts
Copy file name to clipboardExpand all lines: packages/eslint-plugin-formatjs/util.ts+27-3Lines changed: 27 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
121 | 121 |
| |
122 | 122 |
| |
123 | 123 |
| |
124 |
| - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
125 | 127 |
| |
126 |
| - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
127 | 139 |
| |
128 | 140 |
| |
129 | 141 |
| |
| |||
189 | 201 |
| |
190 | 202 |
| |
191 | 203 |
| |
192 |
| - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
193 | 207 |
| |
194 | 208 |
| |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
195 | 219 |
| |
196 | 220 |
| |
197 | 221 |
| |
|
packages/ts-transformer/src/transform.ts
Copy file name to clipboardExpand all lines: packages/ts-transformer/src/transform.ts+41Lines changed: 41 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
307 | 307 |
| |
308 | 308 |
| |
309 | 309 |
| |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
310 | 329 |
| |
311 | 330 |
| |
312 | 331 |
| |
| |||
347 | 366 |
| |
348 | 367 |
| |
349 | 368 |
| |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
350 | 391 |
| |
351 | 392 |
| |
352 | 393 |
| |
|
packages/ts-transformer/tests/fixtures/templateLiteral.tsx
Copy file name to clipboardExpand all lines: packages/ts-transformer/tests/fixtures/templateLiteral.tsx+18-5Lines changed: 18 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
11 | 16 |
| |
12 | 17 |
| |
13 | 18 |
| |
14 |
| - | |
15 |
| - | |
16 |
| - | |
17 |
| - | |
18 |
| - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
19 | 32 |
| |
20 | 33 |
| |
21 | 34 |
|
packages/ts-transformer/tests/index.test.ts
Copy file name to clipboardExpand all lines: packages/ts-transformer/tests/index.test.ts+14-1Lines changed: 14 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
491 | 491 |
| |
492 | 492 |
| |
493 | 493 |
| |
| 494 | + | |
494 | 495 |
| |
495 | 496 |
| |
496 |
| - | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
497 | 501 |
| |
498 | 502 |
| |
499 | 503 |
| |
| |||
503 | 507 |
| |
504 | 508 |
| |
505 | 509 |
| |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
506 | 514 |
| |
507 | 515 |
| |
508 | 516 |
| |
509 | 517 |
| |
510 | 518 |
| |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
511 | 524 |
| |
512 | 525 |
| |
513 | 526 |
| |
|
You can’t perform that action at this time.
0 commit comments