-
Notifications
You must be signed in to change notification settings - Fork 174
chore: Upgrade eslint #3509
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
base: main
Are you sure you want to change the base?
chore: Upgrade eslint #3509
Conversation
01ea018
to
f54db28
Compare
@@ -15,7 +15,6 @@ const data1 = [...data, thresholdSeries]; | |||
// Position of the threshold series in a stacked chart must not affect chart's plot. | |||
const data2 = [data[0], thresholdSeries, data[1], data[2]]; | |||
|
|||
/* eslint-disable react/jsx-key */ |
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.
Eslint now prints a warning if a disable directive does nothing. Removed all useless disables
@@ -130,7 +128,9 @@ export function DateForm({ filter, value, onChange }: PropertyFilterOperatorForm | |||
|
|||
// Parse value from filter text when it changes. | |||
useEffect(() => { | |||
filter && setState(parseDateTimeFilter(filter.trim())); |
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 tuned @typescript-eslint/no-unused-expressions
rule to forbid this pattern
@@ -8,7 +8,7 @@ import AppLayoutToolbar, { AppLayoutToolbarProps } from '../../../lib/components | |||
import createWrapper from '../../../lib/components/test-utils/dom'; | |||
import BreadcrumbGroup from '../../../lib/components/breadcrumb-group'; | |||
|
|||
export function renderComponent(jsx: React.ReactElement) { |
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.
jest/no-export
rule in action
const stickyNotificationsHeight = stickyNotifications ? notificationsHeight ?? 0 : 0; | ||
const stickyNotificationsHeight = stickyNotifications ? (notificationsHeight ?? 0) : 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.
Prettier dependency got upgraded in this PR: 3.2.5 -> 3.5.3
@@ -1,5 +1,7 @@ | |||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | |||
// SPDX-License-Identifier: Apache-2.0 | |||
|
|||
/* eslint-disable jest/no-export */ |
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 rule fails to detect test helper files. We do not have too many, disabled manually for now
@@ -278,7 +278,6 @@ export default function CollapsibleFlashbar({ items, ...restProps }: FlashbarPro | |||
> | |||
{showInnerContent(item) && ( | |||
<Flash | |||
// eslint-disable-next-line react/forbid-component-props |
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 do not have this rule enabled, react/forbid-component-props
Description
Upgrade eslint to v9
Related links, issue #, if available: n/a
How has this been tested?
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md
.CONTRIBUTING.md
.Security
checkSafeUrl
function.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.