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

ESLint: update peers in advance of v9 upgrade #47

Merged
merged 1 commit into from
Nov 7, 2024
Merged

Conversation

mcous
Copy link
Member

@mcous mcous commented Nov 6, 2024

Overview

We're running a few versions behind on our ESLint plugins, and 1 major version behind on ESLint itself.

  • TS-related ESLint deps are blocking a TS update
  • ESLint v8 is now officially deprecated by the ESLint team

We've got one remaining ESLint plugin to go before we're unblocked on the v9 update, so in advance of that, this PR gets every plugin onto their latest version to:

  • Ease the v9 update, since most of these configs/plugins now support both v8 and v9
  • Unblock a TS update in app

Change log

  • Breaking Drop eslint-plugin-sonarjs
    • Did an unofficial poll in Slack a while back; I don't think we feel strongly about this plugin
    • It was blocking our update to @typescript-eslint v8 and eslint v9
    • It pulls in a bunch of unnecessary dependencies (e.g. eslint-plugin-react)
    • They don't have a public issue tracker and are generally not easy to work with, because they're trying to sell you on using the SonarJS service
  • Grab a few rules that needed to be migrated overs
    • Disable rules enforcing destructuring format - these have proved to be annoying and result in hard-to-read code
    • Add lint to enforce import type { ... } where able
    • Fix template string lint to prevent accidentally printing the undefined
  • Update ESLint peer dep ranges
  • Update pinned pnpm version

@@ -154,6 +146,7 @@ module.exports = {
'error',
{ ignoreArrowShorthand: true },
],
'@typescript-eslint/no-import-type-side-effects': ['error'],
Copy link
Member Author

@mcous mcous Nov 7, 2024

Choose a reason for hiding this comment

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

Wanted to call this one out because it finally adds lint enforcement for:

// no
import { type Thing } from './place'
// yes
import type { Thing } from './place'

Which could be really helpful for circular dependency issues, depending on how rollup and/or esbuild do or don't strip imports

Copy link
Member

Choose a reason for hiding this comment

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

Yes! Nice, glad this is linted now

@mcous
Copy link
Member Author

mcous commented Nov 7, 2024

Confirmed with Devin via Slack, gonna merge this one in to unblock continuing work

@mcous mcous merged commit a207bd1 into main Nov 7, 2024
3 checks passed
@mcous mcous deleted the eslint-update-pre-9 branch November 7, 2024 17:36
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.

3 participants