chore: rename eslint flat config to .mjs so it loads#55
Open
mads-jm wants to merge 1 commit into
Open
Conversation
app/eslint.config.js is an ESM flat config (uses import), but app/package.json declares type:commonjs, so Node parses it as CommonJS and ESLint aborts with SyntaxError before lint runs. The .mjs extension forces ESM regardless of the package type, and ESLint auto-discovers eslint.config.mjs, so no script changes are needed. Pure rename; no lint rules changed.
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.
Short Description
Renames
app/eslint.config.js→app/eslint.config.mjsso the ESLint flat config actually loads. Pure rename, zero content change, no rules touched.Background
The flat config is ESM (
import …), butapp/package.jsondeclares"type": "commonjs", so Node parses the.jsconfig as CommonJS and ESLint aborts withSyntaxError: Cannot use import statement outside a modulebefore lint runs at all. All four Wave-1 lanes independently hit this — none could runnpm run lintagainst the real config. The.mjsextension forces ESM regardless of the packagetype, and ESLint auto-discoverseslint.config.mjs, so no script or CI changes are needed.What Has Changed
git mv app/eslint.config.js app/eslint.config.mjs— 100% rename, identical content.github/, npm scripts, husky/lint-staged) — no other edits neededSteps for Reviewing
cd app && npm run lint:SyntaxError, config never loaded, exit 2. ✅npm run typecheckis unaffected (the config was never in the tsc program).Checklist
Closes #
Comments
Infra-only, no issue number. The 22 problems it reveals are a good candidate for a follow-up
choreonce these lanes merge. Repo pins Node v24 via nvm; the fix is Node-version-agnostic.Note on provenance: this branch was originally cut from an ancestor of the
mvpcheckpoint, which would have made its diff revert the checkpoint. It has been re-rooted onto the checkpoint and re-verified as a single rename against the current config content.