-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
chore(v2): upgrade ESLint deps #3767
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,17 +25,6 @@ export type GetActivePluginOptions = {failfast?: boolean}; | |
// get the data of the plugin that is currently "active" | ||
// ie the docs of that plugin are currently browsed | ||
// it is useful to support multiple docs plugin instances | ||
export function getActivePlugin( | ||
allPluginDatas: Record<string, GlobalPluginData>, | ||
pathname: string, | ||
options: {failfast: true}, // use fail-fast option if you know for sure one plugin instance is active | ||
): ActivePlugin; | ||
export function getActivePlugin( | ||
allPluginDatas: Record<string, GlobalPluginData>, | ||
pathname: string, | ||
options?: GetActivePluginOptions, | ||
): ActivePlugin | undefined; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wonder why this is removed? https://mariusschulz.com/blog/function-overloads-in-typescript#version-4-function-overloads this is TS function overload to have more precise typing when some options are used (ie different return type). Does it cause any problem with ESLint? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, my bad, fixed it. |
||
|
||
export function getActivePlugin( | ||
allPluginDatas: Record<string, GlobalPluginData>, | ||
pathname: string, | ||
|
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.
Disabled this 'no-undef' rule as this causes a bunch of errors and to prevent double parsing in TS according to the recommendation from the issue typescript-eslint/typescript-eslint#2508