Skip to content

Upgrade ESLint to version 9, Node to 24, and move eslint-plugin-silvermine here#132

Open
yokuze wants to merge 4 commits intosilvermine:masterfrom
yokuze:upgrade_eslint_9
Open

Upgrade ESLint to version 9, Node to 24, and move eslint-plugin-silvermine here#132
yokuze wants to merge 4 commits intosilvermine:masterfrom
yokuze:upgrade_eslint_9

Conversation

@yokuze
Copy link
Contributor

@yokuze yokuze commented Jan 25, 2026

ADIRL, this PR:

  • Upgrades Node to v24 and bumps @silvermine/standardization to the latest
  • Upgrades to ESLint 9
    • This involved some rule name changes, which you'll see in the diff
  • Moves eslint-plugin-silvermine into this repo, eliminating the cyclical dependency that complicates ESLint upgrades
    • Since this repo contains the plugin also, I moved everything to a src folder and exposed the old paths via package.json's exports field
    • Converted the JS files in the plugin to TS
  • Updated testing/code coverage for the plugin to use vitest

Also note that you may see this in the logs when linting now:

[@stylistic/eslint-plugin]: You are using deprecated options("overrides.arrow") in "type-annotation-spacing", please use "arrow-spacing" instead.

This is an intentional choice; it was the lesser of 3 evils:

  1. Doing what @Stylistic is suggesting, which results in requiring spacing like: ()=> { instead of () => {
  2. Disabling the @stylistic/type-annotation-spacing rule altogether, which lets all kinds of spacing anomalies pass linting
  3. Living with the deprecation warning for now until we can figure out another solution

For several years, we've maintained a separate plugin for our custom ESLint rules
(@silvermine/eslint-plugin-silvermine). The plugin itself needs to be linted, so it
required a dependency on this package. This package needed to be linted, so it required a
dependency on a previous version of itself, and the plugin. This circular dependency makes
upgrading ESLint a multi-step process. It's now possible to ship the plugin along with
this package, simplifying the maintenance of both repos.

This commit also updates us to Node 24, and converts the codebase to TypeScript.

BREAKING CHANGE: ESM is now required. Deprecates @silvermine/eslint-plugin-silvermine
Running the latest version of ESLint + our rules against a relatively small codebase (~100
files) took around 1min 15s on a macOS M1. After reverting the type-aware rules, the same
run took less than 3s. Type-checking using tsc and vue-tsc takes less than 3 seconds, and
so the reason for the extreme slowdown is not immediately clear. To continue forward, I'm
reverting the type-aware rules for now.
@yokuze yokuze requested a review from onebytegone January 25, 2026 17:56
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.

1 participant