CRA 3 fails to handle a trailing comma in tsconfig.json - TSC has no problem
See original GitHub issueThis is a bug report. To reproduce it, run npx create-react-app . --typescript
and change the "jsx": "preserve"
line to "jsx": "preserve",
. This is with CRA3 and I don’t think this happened in CRA2 because I kept my tsconfig.json
the same while upgrading CRA from 2 to 3 and only now got the error. I think this is a CRA issue because running tsc -p .
in the directory goes through with no problem.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:7 (7 by maintainers)
Top Results From Across the Web
tslint - Missing trailing comma (trailing-comma) on the last line
Include trailing comma even in the last line is a good practice of having less merge ... I solved this in my tslint.json...
Read more >TypeScript errors and how to fix them
A list of common TypeScript errors and how to fix them.
Read more >How to use Prettier with ESLint and TypeScript in VSCode
trailingComma set to none means that Prettier will remove any trailing commas at the end of objects. singleQuote set to true means that...
Read more >Untitled
Far cry 3 hunting white belly tapir, Secret of evermore 2 seed of nightmares, ... You're not alone god is with you verse,...
Read more >A Dispassionate Examination of the Empirical Evidence ...
While leaders lead with leading commas, and trailing commas are leading signs of failing lines, and the tale aligns no matter the database...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Unfortunately it looks like typescript uses a hand-written parser. I traced it down to
parseJsonText
which is defined insrc/compiler/parser.ts
. Ahahaha.If we’re allowed to hook into the typescript package, it looks like they provide public access to their parse function.
@TomasHubelbauer You’re absolutely right!