Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
prettierMax
✓ import prettierMax from 'prettier-max'
✗ const prettierMax = require('prettier-max')
ESM-only; plugin is a default export.
PluginOptions
✓ import type { PluginOptions } from 'prettier-max'
TypeScript only; not available in JS.
PrettierMaxPlugin
✓ import type { PrettierMaxPlugin } from 'prettier-max'
✗ import { PrettierMaxPlugin } from 'prettier-max'
Type export only; do not use as value.
Basic Vite configuration using prettier-max with default settings.
import { defineConfig } from 'vite';
import prettierMax from 'prettier-max';
export default defineConfig({
plugins: [
prettierMax()
]
});
Debug
Known issues
gotchaPlugin requires Vite >=5.0.0, Prettier >=3.6.0, and TypeScript >=5.0.0 <7.0.0. Using older versions may cause runtime errors.fixUpgrade to supported versions: vite@^5, prettier@^3.6, typescript@^5.0.
affects: <5.0.0 (Vite) or <3.6.0 (Prettier) or <5.0.0 (TypeScript)
gotchaTypeScript validation runs only if TypeScript is installed. If not, validation is silently skipped and a warning is logged.fixInstall TypeScript or disable with the `typescript: false` option.
affects: all
gotchaBy default, `failOnError` is true, meaning any formatting or type error stops the build. Set to false to continue on errors.fixUse `prettierMax({ failOnError: false })`. affects: all
breakingBreaking change in v1.16.0: The plugin is now ESM-only. CommonJS require() no longer works.fixUse `import` syntax instead of `require()`. If you must use CJS, stick to v1.15.x.
affects: >=1.16.0
Errors
Common errors & fixes
Error: Cannot find module 'prettier'
Missing peer dependency 'prettier'.
fixnpm install -D prettier
Error: The plugin 'prettier-max' requires a Vite version >=5.0.0
Vite version is too old.
fixUpgrade vite to >=5.0.0
Error: The plugin 'prettier-max' requires a TypeScript version >=5.0.0 and <7.0.0
TypeScript version is out of range.
fixInstall matching TypeScript version (>=5.0.0 <7.0.0)
TypeError: prettierMax is not a function
Incorrect import syntax (e.g., using named import instead of default).
fixUse `import prettierMax from 'prettier-max'`
Audit
Dependencies
No dependency data recorded yet.