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

Update eslint to latest versions #334

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

KaliedaRik
Copy link

@KaliedaRik KaliedaRik commented Dec 30, 2024

What does this change?

This PR updates the ESLint tool to the latest versions.

Note that this includes moving to ESLint's new config system - see relevant posts about this made to the ESLint blog .

The primary aim of this update is to get rid of some Dependabot security alerts, and to lower technical debt going forward.

Future Health work

  • This PR works because it is turning off (potentially essential) linting checks - eg: "no-fallthrough": "off"
  • The current output shows where we are using eslint-disable directives in files. In an ideal world, we should not need those directives.
  • Future health work should attempt to address these issues by moving each check from off to warn and then fixing the code that is causing the warn message.
  • Once those warnings are fixed, we can move the check (if essential) from warn to error to prevent anyone reintroducing such an error into the code base.

How to test

  • Run yarn lint locally - there should be plenty of warnings, but no errors reported.
  • Run the PR in the CODE environment to see if the new system brakes any CI steps.
  • Test in CODE - everything should operate as before

@KaliedaRik KaliedaRik requested review from twrichards and a team as code owners December 30, 2024 16:01
Copy link
Contributor

@rebecca-thompson rebecca-thompson left a comment

Choose a reason for hiding this comment

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

Looks good. Is it worth migrating the custom config to use @guardian/eslint-config / @guardian/tsconfig at some point?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants