Skip to content

chore: rename eslint flat config to .mjs so it loads#55

Open
mads-jm wants to merge 1 commit into
mvpfrom
chore/fix-dev-env-lint
Open

chore: rename eslint flat config to .mjs so it loads#55
mads-jm wants to merge 1 commit into
mvpfrom
chore/fix-dev-env-lint

Conversation

@mads-jm

@mads-jm mads-jm commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Short Description

Renames app/eslint.config.jsapp/eslint.config.mjs so the ESLint flat config actually loads. Pure rename, zero content change, no rules touched.

Background

The flat config is ESM (import …), but app/package.json declares "type": "commonjs", so Node parses the .js config as CommonJS and ESLint aborts with SyntaxError: Cannot use import statement outside a module before lint runs at all. All four Wave-1 lanes independently hit this — none could run npm run lint against the real config. The .mjs extension forces ESM regardless of the package type, and ESLint auto-discovers eslint.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
  • Verified nothing references the old path (.github/, npm scripts, husky/lint-staged) — no other edits needed

Steps for Reviewing

  1. Confirm the diff is a single rename with no content delta. ✅
  2. cd app && npm run lint:
    • Before: SyntaxError, config never loaded, exit 2. ✅
    • After: config loads, lint runs to completion and reports 22 pre-existing problems (20 errors, 2 warnings), exit 1 — the normal "found problems" status, not a load failure. ✅
  3. Confirm npm run typecheck is unaffected (the config was never in the tsc program).

Checklist

  • Config loads; lint runs again
  • No lint rules changed; the 22 surfaced problems are pre-existing and intentionally left untouched
  • No references to the old filename remain
  • The pre-existing lint problems it now surfaces are out of scope (separate cleanup)

Closes #


Comments

Infra-only, no issue number. The 22 problems it reveals are a good candidate for a follow-up chore once 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 mvp checkpoint, 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.

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.
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