-
Notifications
You must be signed in to change notification settings - Fork 510
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
Update TypeScript and ESLint to latest versions #1256
Changes from all commits
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 |
---|---|---|
|
@@ -111,6 +111,7 @@ export function getNodeRenderer({ | |
return function renderNode(vertex: TDdgVertex, _: unknown, lv: TLayoutVertex<any> | null) { | ||
const { isFocalNode, key, operation, service } = vertex; | ||
return ( | ||
// eslint-disable-next-line @typescript-eslint/no-use-before-define | ||
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. it's good to have a comment explaining the reason (I assume it's a false positive) |
||
<DdgNodeContent | ||
focalNodeUrl={isFocalNode ? null : getUrl({ density, operation, service, ...extraUrlArgs }, baseUrl)} | ||
focusPathsThroughVertex={focusPathsThroughVertex} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,13 +18,13 @@ import { TNil } from '.'; | |
|
||
export type ConfigMenuItem = { | ||
label: string; | ||
url: string; | ||
url?: string; | ||
anchorTarget?: '_self' | '_blank' | '_parent' | '_top'; | ||
}; | ||
|
||
export type ConfigMenuGroup = { | ||
label: string; | ||
items: ConfigMenuItem[]; | ||
items: readonly ConfigMenuItem[]; | ||
}; | ||
|
||
export type TScript = { | ||
|
@@ -84,15 +84,15 @@ export type Config = { | |
// menuEnabled enables or disables the System Architecture tab. | ||
menuEnabled?: boolean; | ||
|
||
// dagMaxServicesLen defines the maximum number of services allowed | ||
// dagMaxNumServices defines the maximum number of services allowed | ||
// before the DAG dependency view is disabled. Too many services | ||
// cause the DAG view to be non-responsive. | ||
dagMaxServicesLen?: number; | ||
dagMaxNumServices?: number; | ||
}; | ||
|
||
// menu controls the dropdown menu in the top-right corner of the UI. | ||
// When populated, this element completely overrides the default menu. | ||
menu: (ConfigMenuGroup | ConfigMenuItem)[]; | ||
menu: readonly (ConfigMenuGroup | ConfigMenuItem)[]; | ||
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. curious why these specific entries need 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. It seems it's specifically for |
||
|
||
// search section controls some aspects of the Search panel. | ||
search?: { | ||
|
@@ -115,14 +115,14 @@ export type Config = { | |
|
||
// scripts is an array of URLs of additional JavaScript files to be loaded. | ||
// TODO when is it useful? | ||
scripts?: TScript[]; | ||
scripts?: readonly TScript[]; | ||
|
||
// topTagPrefixes defines a set of prefixes for span tag names that are considered | ||
// "important" and cause the matching tags to appear higher in the list of tags. | ||
// For example, topTagPrefixes=['http.'] would cause all span tags that begin with | ||
// "http." to be shown above all other tags. | ||
// See /~https://github.com/jaegertracing/jaeger-ui/issues/218 for background. | ||
topTagPrefixes?: string[]; | ||
topTagPrefixes?: readonly string[]; | ||
|
||
// tracking section controls the collection of usage metrics as analytics events. | ||
// By default, Jaeger uses Google Analytics for event tracking (if enabled). | ||
|
@@ -149,7 +149,7 @@ export type Config = { | |
// strings support variable substitution. | ||
// A trace level link is displayed as an icon at the top of the trace view. | ||
// A tag-level link converts the tag value into a hyperlink. | ||
linkPatterns?: LinkPatternsConfig; | ||
linkPatterns?: readonly LinkPatternsConfig[]; | ||
|
||
// monitor section controls Service Performance Monitoring tab. | ||
monitor?: MonitorConfig; | ||
|
@@ -159,7 +159,7 @@ export type Config = { | |
deepDependencies?: { | ||
menuEnabled?: boolean; | ||
}; | ||
pathAgnosticDecorations?: TPathAgnosticDecorationSchema[]; | ||
pathAgnosticDecorations?: readonly TPathAgnosticDecorationSchema[]; | ||
qualityMetrics?: { | ||
menuEnabled?: boolean; | ||
menuLabel?: 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.
Just curious, what's the harm in keeping them? if TS flags them first, then fixing the issue would also fix ESLint issue, would it not? (basically, I prefer fewer deviations from defaults if possible)
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.
The problem is that these can cause false positives with the new version of
@typescript-eslint
. E.g. removing the suppression for core'sno-shadow
rules results in a plethora of bogus reports about TS type definitions. The recommendation of silencing the corresponding core rules comes from the plugin itself.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.
Another way to fix it could be to make the root eslintrc also extend the
recommended
config from@typescript-eslint
, because that config already does this toggling for us. This is what plexus does already. I'm thinking this could be done in a followup PR as it might cause some new errors.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.
+1 -- #1258