Migrate to ESLint 9 flat config and add Prettier config#101
Open
cusxy wants to merge 1 commit into
Open
Conversation
Replace legacy .eslintrc.js with eslint.config.js flat config, remove @babel/eslint-parser in favor of the built-in parser, add .prettierrc, and apply consistent 2-space formatting across source files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
.eslintrc.jswitheslint.config.jsusing ESLint 9's flat config format@babel/eslint-parser: The project uses plain JavaScript with no experimental syntax, so the built-in ESLint parser is sufficient.prettierrc: Explicit Prettier configuration (tabWidth: 2,printWidth: 150,semi: true,singleQuote: false) replacing inline CLI flagslint:fixscript: Use proper quoted glob pattern and rely on.prettierrcinstead of CLI flags@eslint/js,globals,prettier"use strict"class body statements: These were no-ops inside ES2015+ class bodiesDetails
ESLint Config (
eslint.config.js)@eslint/jsrecommended rulesecmaVersion: 2022,sourceType: "commonjs"(corrects the old config which incorrectly hadsourceType: "module")globals.mochanode_modules/,coverage/,.nyc_output/Removed Dependencies
@babel/eslint-parser(and its transitive dep@nicolo-ribaudo/eslint-scope-5-internals)Added Dependencies
@eslint/js^9.39.4globals^17.4.0prettier^3.8.1Test plan
npm test— all 9 tests passingnpm run lint:fix— runs cleanly with no changes needed🤖 Generated with Claude Code