{"id":20328,"library":"prettier-max","title":"prettier-max","description":"Minimalist Vite plugin that auto-formats code with Prettier and optionally runs TypeScript type checking on build, including deprecation and default import detection. Current stable version: 1.16.0. Release cadence: active, with regular updates. Key differentiators: no ESLint configuration, relies on .prettierrc and tsconfig.json for consistency, simple API, and fail-on-error behavior by default. Requires peer dependencies: prettier >=3.6.0, typescript >=5.0.0 <7.0.0, vite >=5.0.0. Ships TypeScript types.","status":"active","version":"1.16.0","language":"javascript","source_language":"en","source_url":"https://github.com/kekyo/prettier-max","tags":["javascript","prettier","vite","plugin","typescript","detect-deprecation"],"install":[{"cmd":"npm install prettier-max","lang":"bash","label":"npm"},{"cmd":"yarn add prettier-max","lang":"bash","label":"yarn"},{"cmd":"pnpm add prettier-max","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only; plugin is a default export.","wrong":"const prettierMax = require('prettier-max')","symbol":"prettierMax","correct":"import prettierMax from 'prettier-max'"},{"note":"TypeScript only; not available in JS.","symbol":"PluginOptions","correct":"import type { PluginOptions } from 'prettier-max'"},{"note":"Type export only; do not use as value.","wrong":"import { PrettierMaxPlugin } from 'prettier-max'","symbol":"PrettierMaxPlugin","correct":"import type { PrettierMaxPlugin } from 'prettier-max'"}],"quickstart":{"code":"import { defineConfig } from 'vite';\nimport prettierMax from 'prettier-max';\n\nexport default defineConfig({\n  plugins: [\n    prettierMax()\n  ]\n});","lang":"typescript","description":"Basic Vite configuration using prettier-max with default settings."},"warnings":[{"fix":"Upgrade to supported versions: vite@^5, prettier@^3.6, typescript@^5.0.","message":"Plugin requires Vite >=5.0.0, Prettier >=3.6.0, and TypeScript >=5.0.0 <7.0.0. Using older versions may cause runtime errors.","severity":"gotcha","affected_versions":"<5.0.0 (Vite) or <3.6.0 (Prettier) or <5.0.0 (TypeScript)"},{"fix":"Install TypeScript or disable with the `typescript: false` option.","message":"TypeScript validation runs only if TypeScript is installed. If not, validation is silently skipped and a warning is logged.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `prettierMax({ failOnError: false })`.","message":"By default, `failOnError` is true, meaning any formatting or type error stops the build. Set to false to continue on errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `import` syntax instead of `require()`. If you must use CJS, stick to v1.15.x.","message":"Breaking change in v1.16.0: The plugin is now ESM-only. CommonJS require() no longer works.","severity":"breaking","affected_versions":">=1.16.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install -D prettier","cause":"Missing peer dependency 'prettier'.","error":"Error: Cannot find module 'prettier'"},{"fix":"Upgrade vite to >=5.0.0","cause":"Vite version is too old.","error":"Error: The plugin 'prettier-max' requires a Vite version >=5.0.0"},{"fix":"Install matching TypeScript version (>=5.0.0 <7.0.0)","cause":"TypeScript version is out of range.","error":"Error: The plugin 'prettier-max' requires a TypeScript version >=5.0.0 and <7.0.0"},{"fix":"Use `import prettierMax from 'prettier-max'`","cause":"Incorrect import syntax (e.g., using named import instead of default).","error":"TypeError: prettierMax is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}