Ignore commented code
See original GitHub issueCurrently when a string with the gql
tag exists but is commented, there will be an exception:
{ GraphQLError: Syntax Error ./xxxx/container-component.tsx (2:1) Cannot parse the unexpected character "/".
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
How to make git ignore comments in file? - Stack Overflow
Just keep the comment committed latest. My point is that the comment should somehow explain the code, so if the code is not...
Read more >VSCode fails to ignore commented lines in commit template ...
Yes VS Code Version: Version: 1.60.2 (user setup) Commit: ... ignore commented lines in commit template when configured comment char #133770.
Read more >Why is it wrong to comment out code and then gradually ...
Leaving commented code in your code base is a bad practice but that is not what you are doing if you work through...
Read more >How to relax rules for "Remove this commented out code"?
Hi Sonar Team,. Is there any way to relax the comment out code in Sonarqube. There are lot of commented out lines in...
Read more >Please, don't commit commented out code - Kent C. Dodds
However commented out code does not justify its existence. It wont take long before that commented code is out of context, no longer...
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
@jonaskello @FredyC We recently merged this: https://github.com/dotansimha/graphql-code-generator/pull/907 , now the codegen will parse the code file as AST and extract the documents from it.
IMO, using strip-comments is a simpler solution and therefore better 😃. If there are more advanced code-analysis needed later we can look into parsing into an abstract syntax tree at that point.