Skip to content

🛠 Repo: Bump eslint from 8 to 9 #5483

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Tooling Suggestion Checklist

Overview

Mocha has a devDependency right now on a 2-year-old, deprecated version of eslint:

"eslint": "^8.56.0",

This isn't a problem on its own. eslint@8 works as-is. But it pulls in old dependencies that bloat our local node_modules size. For example, in #5484, we see it pulling in strip-json-comments@3:

$ npm ls strip-json-comments@3
mocha@11.7.4 /Users/josh/repos/mocha
├─┬ eslint@8.56.0
│ └─┬ @eslint/eslintrc@2.1.4
│   └── strip-json-comments@3.1.1
├─┬ jsdoc@3.6.11
│ └── strip-json-comments@3.1.1
└─┬ markdownlint-cli@0.30.0
  └─┬ run-con@1.2.11
    └── strip-json-comments@3.1.1

I think it'd be a good idea in general to bump it to the latest major version.

Additional Info

In theory it'd be nice to automatically upgrade all devDependencies. #5055 is blocked for now: #5055 (comment).

Also note that this issue is not about significantly changing the list of rules we use. It's just about bumping the version of ESLint (and, if necessary, plugins / other related devDependencies). Rule & plugin changes are tracked separately.

See also ESLint 9 Migration Guide

💖

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: repository toolingconcerning ease of contributionstatus: in triagea maintainer should (re-)triage (review) this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions