-
Notifications
You must be signed in to change notification settings - Fork 17
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
AG-12204 - Next step in ESLlint v9 upgrade #3359
Conversation
b83572c
to
987959c
Compare
@@ -52,8 +52,6 @@ export const sonarjsConfig = [ | |||
|
|||
// For review - new for eslint 9. | |||
'sonarjs/no-redeclare': 1, | |||
'sonarjs/public-static-readonly': 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.
Note: Removing these entries activates the rules at error level.
title?: string; | ||
symbol?: LegendSymbolOptions; | ||
data?: TooltipContentDataRow[]; | ||
rawHtmlString?: 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.
This is one or the other. Might be better to represent like this:-
title?: string; | |
symbol?: LegendSymbolOptions; | |
data?: TooltipContentDataRow[]; | |
rawHtmlString?: string; | |
} | |
title?: string; | |
symbol?: LegendSymbolOptions; | |
data?: TooltipContentDataRow[]; | |
} | { | |
rawHtmlString: 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.
I've tried applying this - but the simplest thing to do is add a type
discriminator field, as 'rawHtmlString' in content
isn't enough of a hint to the TS compiler that on the negative control flow that the inferred typing of content
is a single union member type.
9e3aeac is the smallest additional change encoding use of a type union for TooltipContent
.
let i = 0; | ||
let estimatedWidth = 0; | ||
let lastSpaceIndex = 0; | ||
while (i < line.length) { |
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.
Wondering, what was the warning here about?
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.
Mutating the iteratee in a for-loop
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.
PTAL
title?: string; | ||
symbol?: LegendSymbolOptions; | ||
data?: TooltipContentDataRow[]; | ||
rawHtmlString?: 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.
I've tried applying this - but the simplest thing to do is add a type
discriminator field, as 'rawHtmlString' in content
isn't enough of a hint to the TS compiler that on the negative control flow that the inferred typing of content
is a single union member type.
9e3aeac is the smallest additional change encoding use of a type union for TooltipContent
.
https://ag-grid.atlassian.net/browse/AG-12204