{"id":19647,"library":"eslint-formatter-mo","title":"eslint-formatter-mo","description":"Good-lookin' ESLint formatter for delightful readability. Current stable version is 2.4.1, released November 2025, with regular updates. Key differentiators: colorful output with code highlighting via Shiki, support for 50+ VS Code themes, JSON/Markdown/CSS highlighting, and auto-fixable markers. ESM-only since v2 (breaking change). Active maintenance with frequent bug fixes.","status":"active","version":"2.4.1","language":"javascript","source_language":"en","source_url":"https://github.com/fengzilong/eslint-formatter-mo","tags":["javascript","eslint","eslint-formatter","eslintformatter","formatter","pretty","fancy","readability"],"install":[{"cmd":"npm install eslint-formatter-mo","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-formatter-mo","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-formatter-mo","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only since v2; CommonJS require will fail.","wrong":"const eslintFormatterMo = require('eslint-formatter-mo')","symbol":"default","correct":"import eslintFormatterMo from 'eslint-formatter-mo'"},{"note":"The default export is a function that takes ESLint results and returns a formatted string.","wrong":"const mo = require('eslint-formatter-mo');","symbol":"default (as formatter function)","correct":"import mo from 'eslint-formatter-mo'; eslint.lintFiles(patterns).then(results => console.log(mo(results)))"},{"note":"Types may be bundled; check package for type definitions.","wrong":"","symbol":"TypeScript type (if provided)","correct":"import type { ESLintFormatter } from 'eslint-formatter-mo'"}],"quickstart":{"code":"// Install: npm i eslint-formatter-mo -D\n// Use as ESLint formatter via CLI:\n// eslint src/ -f mo\n// Or programmatically:\nimport mo from 'eslint-formatter-mo';\nimport { ESLint } from 'eslint';\n\nconst eslint = new ESLint();\nconst results = await eslint.lintFiles(['src/']);\nconst formatted = mo(results);\nconsole.log(formatted);\n\n// Custom theme via env var:\n// MO_THEME=dracula eslint src/ -f mo","lang":"typescript","description":"Shows installation as dev dependency, CLI usage with `-f mo`, programmatic use with import, and custom theme via environment variable."},"warnings":[{"fix":"Use import syntax or upgrade to Node 18+ with \"type\": \"module\" in package.json.","message":"v2.0.0 moved to ESM only. CommonJS require() will throw an error.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Upgrade to v2.4.1 and migrate to ESM.","message":"v1.x is no longer maintained. Users should upgrade to v2.x.","severity":"deprecated","affected_versions":"<2.0.0"},{"fix":"Ensure network access or pre-cache themes. The package will work without highlighting if offline.","message":"The formatter uses Shiki for syntax highlighting, which requires network access for theme loading on first use.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Set MO_THEME in your shell or .env file before calling eslint.","message":"Environment variable MO_THEME must be set before running ESLint, not during.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Use --no-color or pipe output to a file for non-TTY environments.","message":"Output is designed for terminals; may not render correctly in CI logs or non-TTY environments.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'2.4.1':17 '2025':20 '50':35 'activ':53 'auto':43 'auto-fix':42 'break':51 'bug':57 'chang':52 'code':29,37 'color':26 'current':13 'delight':11 'differenti':25 'eslint':2,8,60,62 'eslint-formatt':61 'eslint-formatter-mo':1 'eslintformatt':64 'esm':47 'esm-on':46 'fanci':67 'fix':58 'fixabl':44 'formatt':3,9,63,65 'frequent':56 'good':6 'good-lookin':5 'highlight':30,40 'javascript':59 'json/markdown/css':39 'key':24 'lookin':7 'mainten':54 'marker':45 'mo':4 'novemb':19 'output':27 'pretti':66 'readabl':12,68 'regular':22 'releas':18 'shiki':32 'sinc':49 'stabl':14 'support':33 'theme':38 'updat':23 'v2':50 'version':15 'via':31 'vs':36","created_at":"2026-04-25T11:18:54.005200+00:00","updated_at":"2026-04-25T11:18:54.005200+00:00","problems":[{"fix":"Run `npm install eslint-formatter-mo --save-dev`.","cause":"Package not installed or not in node_modules.","error":"Cannot find module 'eslint-formatter-mo'"},{"fix":"Use `import` syntax or downgrade to v1.x (not recommended).","cause":"Using CommonJS require() with ESM-only v2+.","error":"require() of ES Module eslint-formatter-mo from CommonJS not supported."},{"fix":"Upgrade to v2.4.1 or later.","cause":"Bug in v2.4.0 fixed in v2.4.1.","error":"Error: Cannot access 'ruleId' before initialization"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/fengzilong/eslint-formatter-mo","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/eslint-formatter-mo","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}