Skip to content
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

Frontend: Update to Eslint 9 #94823

Merged
merged 27 commits into from
Nov 7, 2024
Merged

Frontend: Update to Eslint 9 #94823

merged 27 commits into from
Nov 7, 2024

Conversation

jackw
Copy link
Contributor

@jackw jackw commented Oct 16, 2024

What is this feature?

This PR updates the codebase to use Eslint 9.

Massive thanks to @ashharrison90 for the support/answering all my random questions. 🏅

Why do we need this feature?

So we stay up to date with dependencies and stop using a deprecated version of eslint.

Who is this feature for?

Grafana devs / contributors

Which issue(s) does this PR fix?:

Related: grafana/plugin-tools/issues/879

Special notes for your reviewer:

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@jackw jackw added area/frontend dependencies Pull requests that update a dependency file no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes labels Oct 16, 2024
@jackw jackw added this to the 11.4.x milestone Oct 16, 2024
@jackw jackw self-assigned this Oct 16, 2024
@jackw jackw requested review from a team as code owners October 16, 2024 16:16
@jackw jackw requested review from Clarity-89, ashharrison90, sunker, gillesdemey and tomratcliffe and removed request for a team October 16, 2024 16:16
@jackw jackw requested review from a team as code owners October 29, 2024 11:21
@jackw jackw requested review from aarongodin, Jguer and IevaVasiljeva and removed request for a team October 29, 2024 11:21
Copy link
Contributor

@ashharrison90 ashharrison90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's with the modifications to .go files? 🤔

@itsmylife
Copy link
Contributor

what's with the modifications to .go files? 🤔

You don't need to specify the type again while you are defining the items in map. The type can be inferred from the variable definition. They are unnecessary. And somehow maybe eslint, or some other tool triggered a cleanup. So we have these changes.

@ashharrison90
Copy link
Contributor

ashharrison90 commented Oct 29, 2024

what's with the modifications to .go files? 🤔

You don't need to specify the type again while you are defining the items in map. The type can be inferred from the variable definition. They are unnecessary. And somehow maybe eslint, or some other tool triggered a cleanup. So we have these changes.

edit: i don't think it can be eslint... but i would like to know how it got here 😅

@itsmylife
Copy link
Contributor

@ashharrison90 I agree that we should remove those .go changes from this PR. And yeah I'd like to know too :)

@jackw
Copy link
Contributor Author

jackw commented Oct 30, 2024

what's with the modifications to .go files? 🤔

A fine question! It appears to have happened when I merged main into this branch. 😕

@jackw
Copy link
Contributor Author

jackw commented Oct 30, 2024

what's with the modifications to .go files? 🤔

It's caused by the git hook backend-format and the merge of main. My IDE complains about it:

image

Switching to main and running gofmt -w -s pkg/services/authz/zanzana/common/info.go will also trigger it.

As there is no go format check in CI it will only surface when someone touches the file and uses the git hooks.

I've reverted them in 365c055. 👍

Copy link
Contributor

@ashharrison90 ashharrison90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

@@ -90,6 +91,7 @@
"@react-types/shared": "3.25.0",
"@rtk-query/codegen-openapi": "^1.2.0",
"@rtsao/plugin-proposal-class-properties": "7.0.1-patch.1",
"@stylistic/eslint-plugin-ts": "^2.9.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we actually use this anywhere? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a peer dependency of the grafana/eslint-config.

@jackw jackw merged commit 8c41137 into main Nov 7, 2024
18 checks passed
@jackw jackw deleted the jackw/eslint-9 branch November 7, 2024 15:31
@zserge zserge modified the milestones: 11.4.x, 11.4.1, 11.4.0 Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backend area/frontend dependencies Pull requests that update a dependency file no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants