-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(typescript-estree): if the template literal is tagged and the text has an invalid escape, cooked
will be null
#11355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Thanks for the PR, @nayounsang! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
cooked
will be null
cooked
will be null
View your CI Pipeline Execution ↗ for commit b85dda1
☁️ Nx Cloud last updated this comment at |
It's strange. In my local, I cleared the cache and the changed types were built in the types package. Isn't the CI environment a new virtual machine that runs anyway?
|
hi @JamesHenry
|
@nayounsang Yes, sorry I forgot about this one, I obviously kept iterating on your other one to discover that one wasn't a caching issue. This one might be related to your other one or it might be totally separate. Please revert my changes when you fix up the conflicts and let's get back to a clean slate. If it's still failing unexpectedly after that I can take another look |
@nayounsang I see you're doing a lot of pushes that result in failed tasks. Are you running these things locally before pushing? Ideally you would iterate locally to get the high priority tasks passing and then push up to CI to verify in a neutral environment |
@JamesHenry Sorry, I will push after resolving all failures that occurred in CI next time. When I work on the command for the project locally, my laptop has a performance issue that makes it not work for a long time. So I tried to check the work result in CI. Still, I was in a hurry. |
@@ -8,9 +8,6 @@ | |||
{ | |||
"path": "../typescript-estree/tsconfig.build.json" | |||
}, | |||
{ | |||
"path": "../types/tsconfig.build.json" | |||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of this message by nx,
NX The workspace is out of sync
[@nx/js:typescript-sync]: Some TypeScript configuration files are missing project references to the projects they depend on or contain outdated project references.
? Would you like to sync the identified changes to get your workspace up to date? …
Yes, sync the changes and run the tasks
No, run the tasks without syncing the changes
There are a lot of changes like this due to sync, but even after reading the documentation, I'm not sure if this is correct.
I reverted all dependency related changes.
packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts
Outdated
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is Please upload reports for the commit b85dda1 to get more accurate results. ❌ Your patch check has failed because the patch coverage (71.84%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #11355 +/- ##
==========================================
+ Coverage 90.86% 90.95% +0.08%
==========================================
Files 503 503
Lines 51052 51139 +87
Branches 8416 8448 +32
==========================================
+ Hits 46390 46512 +122
+ Misses 4648 4614 -34
+ Partials 14 13 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
What is this err on CI?
This is my first time seeing this and I don't know how to fix it in local as content of err msg and success in the local. |
expr: TSESTree.TaggedTemplateExpression, | ||
): void { | ||
if (text == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change affects three rules.
Would it be better to simply ignore it? How should I handle it?
Once this is decided, I will also add tests.
continue; | ||
} | ||
|
||
const nextChar = text[index + 1]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't care about if nextChar doesn't exist because of typescript error & parsing error.
PR Checklist
TemplateElement
inTaggedTemplateExpression
#11353Overview
ref: https://github.com/estree/estree/blob/2bc9ea235184b6164e31b1088575447657e686c6/es2018.md?plain=1#L34
isInTaggedTemplate
indicating whether template literal is tagged