CLI · fix
cem fix
Automatically fix ESLint violations and apply Prettier code formatting across your entire codebase in one rapid command.
bash
cem fixEquivalent to running cem check --fix, or chaining eslint src --fix and prettier --write src.
Two ways to auto-fix
| Command | Behavior |
|---|---|
| cem fix | Directly runs ESLint autofix and Prettier write across all project source files. |
| cem check --fix | Runs the full typecheck, lint, and format pipeline, automatically repairing fixable lint and style errors. |
Terminal output
Powered by CEM's redesigned developer console UI featuring pure ANSI escapes, status badges, and spinners:
[CEM] cem fix lint:fix · prettier:fix
──────────────────────────────────────────────────────
◆ ESLint auto-fix (eslint --fix)… ✔ Cleaned 4 files
◆ Prettier format (prettier -w)… ✔ Formatted 12 files
──────────────────────────────────────────────────────
✔ All fixable code quality issues resolved.What gets fixed
- ESLint v10 rules: Missing semicolons, quote styles, unused imports (where safe), trailing commas, and formatting rules.
- Prettier formatting: Consistent indentation, bracket spacing, line wraps, and arrow function parameter parentheses.
- Full flat config support: Works seamlessly with modern ESLint flat configurations (
eslint.config.js) and updated glob overrides (^13.0.6).
Unfixable errors
If TypeScript type errors or unfixable ESLint logic errors exist (such as missing required properties or unreachable code), CEM prints the exact file location, line number, and rule name so you can resolve them manually.