Registry / testing / zero-code-formatter

zero-code-formatter

JSON →
library0.0.5jsnpmunverified

A customized fork of Prettier v3.4.2 that provides opinionated code formatting specifically for Vue template sections. Currently at version 0.0.5, this package enforces a strict configuration (tabWidth: 4, printWidth: 120, no semicolons, single quotes, consistent quote props, bracketSameLine, htmlWhitespaceSensitivity: 'ignore', vueIndentScriptAndStyle, singleAttributePerLine) and is intended for use as a dev dependency with Node >=14. It includes TypeScript type definitions and is released on an irregular cadence. Unlike the full Prettier, it focuses solely on Vue template formatting, making it a lightweight alternative for teams that want a zero-config, opinionated Vue formatting tool.

npm install zero-code-formatter
INSTALL
IMPORT
SIG · ZERO-CODE-FORMATTE
Z
zero-code-formatter
testingjavascriptv0.0.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import zeroCodeFormatter from 'zero-code-formatter'
const zeroCodeFormatter = require('zero-code-formatter')
Package is ESM-only; CommonJS require will fail.

Shows installation, CLI usage, and programmatic formatting of a Vue file.

// Install as dev dependency npm install -D zero-code-formatter // Format a Vue file npx zero-code-formatter --write path/to/MyComponent.vue // Or use programmatically (ESM) import zeroCodeFormatter from 'zero-code-formatter'; const code = `<template> <div> <p>Hello</p> </div> </template>`; const formatted = zeroCodeFormatter.format(code, { parser: 'vue' }); console.log(formatted);
Debug
Known issues
gotchaPackage only formats Vue template sections, not other file types like JS, CSS, or HTML.
fix
Use original Prettier for non-Vue formatting.
affects: >=0.0.1
deprecatedThe API is built on Prettier v3.4.2 and may not receive updates for newer Prettier versions.
fix
Pin to this version or consider using official Prettier with Vue plugin.
affects: 0.0.5
gotchaConfiguration is hardcoded; custom .prettierrc or CLI options will be ignored.
fix
If you need custom config, use original Prettier instead.
affects: >=0.0.1
breakingPackage does not support CommonJS requires; requires ESM and Node >=14.
fix
Use import syntax and ensure Node >=14.
affects: >=0.0.1
Errors
Common errors & fixes
Cannot find module 'zero-code-formatter'
Package not installed or installed in wrong directory.
fix
Run 'npm install -D zero-code-formatter' in your project root.
SyntaxError: Cannot use import statement outside a module
Using import syntax in a CommonJS file.
fix
Add 'type': 'module' to package.json or use require (if supported, but it is not).
Upgrade
Version history
0.0.5latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
30 hits · last 30 days
node
26
OpenAI (training)
1
Resources
zero-code-formatter — npm install zero-code-formatter · libregistry