Commit 62d2a25
Match transformForLint masking to ember-estree's toPlaceholderJS
typescript-eslint hashes the code the parser passes in against what the
watch program last read from disk (via the patched ts.sys.readFile). The
two texts came from different masking strategies: toPlaceholderJS keeps
template content and blanks only backticks/dollars, while transformForLint
blanked every non-newline character. Any .gts/.gjs file with a non-empty
template therefore hashed differently, which fired the file-changed watch
callback and silently rebuilt the entire TS program inside getProgram() —
once per file linted. On large codebases that is hour-long lint runs and
tens of GB of memory (#229).
Blank only backticks/dollars, byte-matching ember-estree 0.6.10, and add a
parity regression test so the two implementations cannot drift again. This
masking is still overflow-safe for the #226 case: replacement is 1:1, so
the placeholder never outgrows the original region.
Fixes #229
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent d94a3ba commit 62d2a25
2 files changed
Lines changed: 64 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
283 | | - | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
284 | 287 | | |
285 | 288 | | |
286 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
0 commit comments