Upgrade ESLint to version 9, Node to 24, and move eslint-plugin-silvermine here#132
Open
yokuze wants to merge 4 commits intosilvermine:masterfrom
Open
Upgrade ESLint to version 9, Node to 24, and move eslint-plugin-silvermine here#132yokuze wants to merge 4 commits intosilvermine:masterfrom
yokuze wants to merge 4 commits intosilvermine:masterfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ADIRL, this PR:
srcfolder and exposed the old paths via package.json's exports fieldvitestAlso note that you may see this in the logs when linting now:
This is an intentional choice; it was the lesser of 3 evils:
()=> {instead of() => {@stylistic/type-annotation-spacingrule altogether, which lets all kinds of spacing anomalies pass linting