-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat: support stringly-typed extends #10973
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: support stringly-typed extends #10973
Conversation
Thanks for the PR, @kirkwaiblinger! 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 site configuration. |
View your CI Pipeline Execution ↗ for commit 39228c2.
☁️ Nx Cloud last updated this comment at |
@@ -148,7 +148,8 @@ | |||
"react-split-pane@^0.1.92": "patch:react-split-pane@npm%3A0.1.92#./.yarn/patches/react-split-pane-npm-0.1.92-93dbf51dff.patch", | |||
"tmp": "0.2.1", | |||
"tsx": "^4.7.2", | |||
"typescript": "5.8.2" | |||
"typescript": "5.8.2", | |||
"@eslint/config-helpers": "^0.2.0" |
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 manual resolution is required pending release of the next version of eslint (eslint/eslint#19533 has been merged but not yet released)
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.
We're clear to remove this now, right?
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.
well, on main we still have
├─ eslint@npm:9.22.0
│ └─ @eslint/config-helpers@npm:0.1.0 (via npm:^0.1.0)
│
└─ eslint@npm:9.22.0 [43684]
└─ @eslint/config-helpers@npm:0.1.0 (via npm:^0.1.0)
so we need either this or to upgrade eslint past 9.23
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.
(I've implemented the latter, updating our eslint dependency) I've kept the resolutions
since I had some CI failures that I had a hard time debugging when I tried upgrading the eslint version.
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.
but yeah once main has eslint >= 9.23 we can remove it.
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.
Fun. I just clicked the checkmark in #6687 to start the Renovate PR.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10973 +/- ##
==========================================
+ Coverage 88.01% 88.08% +0.07%
==========================================
Files 470 497 +27
Lines 16805 16901 +96
Branches 4746 4746
==========================================
+ Hits 14791 14888 +97
Misses 1667 1667
+ Partials 347 346 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
import type { TSESLint } from '@typescript-eslint/utils'; | ||
import type { FlatConfig, Linter } from '@typescript-eslint/utils/ts-eslint'; | ||
|
||
import * as parserBase from '@typescript-eslint/parser'; |
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.
I hate that we have to add an explicit dependency on our parser inside our plugin now.
But it is what it is.
defineConfig({ | ||
extends: ['ts/flat/strict'], | ||
plugins: { | ||
// @ts-expect-error -- types aren't compatible. |
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.
side note:
it's been on my todo list for a while -- we need to just bite the bullet and make them compatible.
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.
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.
PR Checklist
defineConfig
string config references #10934Overview
Previously,
packages/eslint-plugin/src/configs
, and were exposed via theplugin.configs
fieldpackages/typescript-eslint/src/configs
, and were exposed via thetseslint.configs
field.tseslint.parser
.use-at-your-own-risk
config generation function - this was just to share code, not for any runtime reason).Now,
packages/eslint-plugin/src/configs/eslintrc
.packages/eslint-plugin/src/configs/flat
.plugin.configs
object contains all the same eslintrc configs and all the flat configs, prefixed with'flat/
. Conceptually,tseslint.configs
does not use theflat/
prefixes. It only exports eslint v9 flat configs, just like it always has.eslint-plugin
to be===
to their counterparts intypescript-eslint
at runtime, theflatConfigs
andparser
are now exported fromeslint-plugin
via a newuse-at-your-own-risk
export in order to be re-exported bytypescript-eslint
.In summary, these changes ensure: