-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(experimental-utils): move isTypeReadonly from eslint-plugin to experimental-utils #3658
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
feat(experimental-utils): move isTypeReadonly from eslint-plugin to experimental-utils #3658
Conversation
Thanks for the PR, @RebeccaStevens! 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. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day. |
Codecov Report
@@ Coverage Diff @@
## main #3658 +/- ##
==========================================
- Coverage 93.88% 91.88% -2.01%
==========================================
Files 297 168 -129
Lines 11193 8382 -2811
Branches 3253 2666 -587
==========================================
- Hits 10509 7702 -2807
- Misses 416 481 +65
+ Partials 268 199 -69
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Hmm.. This might be a problem for some of our consumers.
Many consumers of @typescript-eslint/experimental-utils
do so in environments that don't actually use typescript.
for example eslint-plugin-jest
can be used by non-TS projects, but because the plugin is written in TS they use experimental-utils
.
Could you please test two things for me:
(1) do a raw install of the plugin into a folder with no typescript
dependency.
eg
cd /tmp
mkdir ts-eslint-test-3658
cd ts-eslint-test-3658
yarn add file:~/path/to/your/checkout/packages/experimental-utils
I believe that this should be the correct command to add a local path, and it should show warnings. I think.
The idea is that this should install fine with no warnings about missing dependencies.
We might be able to get around the warning by explicitly marking the TS dependency as optional:
https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/package.json#L68-L72
(2) make sure it doesn't crash when imported from an environment without TS installed.
cd /tmp/ts-eslint-test-3658
node --eval="require('@typescript-eslint/experimental-utils')"
This should not crash (I might have got the node command wrong... also try node
and then executing the require in the REPL).
This should execute without crashing.
9726276
to
d6e98f1
Compare
I added |
d6e98f1
to
e531d15
Compare
…roject Once typescript-eslint/typescript-eslint#3658 is merged, this commit can be reverted
…roject Once typescript-eslint/typescript-eslint#3658 is merged, this commit can be reverted
…roject Once typescript-eslint/typescript-eslint#3658 is merged, this commit can be reverted
…roject Once typescript-eslint/typescript-eslint#3658 is merged, this commit can be reverted
…roject Once typescript-eslint/typescript-eslint#3658 is merged, this commit can be reverted
…roject Once typescript-eslint/typescript-eslint#3658 is merged, this commit can be reverted
…roject Once typescript-eslint/typescript-eslint#3658 is merged, this commit can be reverted
…roject Once typescript-eslint/typescript-eslint#3658 is merged, this commit can be reverted
…roject Once typescript-eslint/typescript-eslint#3658 is merged, this commit can be reverted
…roject Once typescript-eslint/typescript-eslint#3658 is merged, this commit can be reverted
…roject Once typescript-eslint/typescript-eslint#3658 is merged, this commit can be reverted
…roject Once typescript-eslint/typescript-eslint#3658 is merged, this commit can be reverted
1f840cb
to
5fd2cc1
Compare
66f8343
to
81dd8df
Compare
88ac9ab
to
d73a71a
Compare
…roject Once typescript-eslint/typescript-eslint#3658 is merged, this commit can be reverted
No problemo - thanks for all your work! To make things easier for you lets see if we can get this merged sooner rather than later so we don't have to keep rebasing and dealing with merge conflicts! I'll see if I can find some time this weekend to get this merged. |
Sounds good. |
d73a71a
to
58ec395
Compare
❌ Deploy Preview for typescript-eslint failed. 🔨 Explore the source changes: edb5bc9 🔍 Inspect the deploy log: https://app.netlify.com/sites/typescript-eslint/deploys/61ccafa134fc990007340b8b |
update: I haven't forgotten about this - on my todo list. Hopefully this weekend. |
c9a11da
to
4fc58d2
Compare
f665577
to
481dd62
Compare
@bradzacher Updated again. |
481dd62
to
b482f03
Compare
sorry it took me so long to get back to this! |
063c353
to
edb5bc9
Compare
…roject Once typescript-eslint/typescript-eslint#3658 is merged, this commit can be reverted
files moved:
Fixes #3657
Fixes #3305