Registry / devops / x-formatter

x-formatter

JSON →
library0.0.2jsnpmunverified

Exports selected utilities from prettierX for use by prettier-plugin-x and similar formatting plugins. Version 0.0.2 is very early; no release cadence established. Key differentiator: provides a controlled subset of prettierX internals to support plugin development without exposing full internals. Currently limited to a single export of `availableParsers`.

npm install x-formatter
INSTALL
IMPORT
SIG · X-FORMATTER
X
x-formatter
devopsjavascriptv0.0.2
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.

availableParsers
import { availableParsers } from 'x-formatter'
Default named export only.
x-formatter (default)
import xformatter from 'x-formatter'
import { default } from 'x-formatter'
Default export also available in v0.0.2.

Demonstrates importing and using the availableParsers export from x-formatter in an ESM context.

import { availableParsers } from 'x-formatter'; console.log(availableParsers); // Array of parser names // Use with prettier plugin import { format } from 'prettier'; const code = 'const x = 1;'; format(code, { parser: 'babel' }).then(result => console.log(result));
Debug
Known issues
deprecatedPackage and its upstream prettierX are experimental; APIs may change without notice.
fix
Pin to exact version and test each update.
affects: >=0.0.0
gotchaOnly exports availableParsers; other prettierX internals not exposed.
fix
Check source or upstream for additional exports.
affects: 0.0.2
Errors
Common errors & fixes
Cannot find module 'x-formatter'
Package not installed or not in node_modules.
fix
Run: npm install x-formatter
export 'prettierX' (imported as 'prettierX') was not found in 'x-formatter'
Attempting to import a non-existent export; only availableParsers exists.
fix
Use: import { availableParsers } from 'x-formatter'
Upgrade
Version history
0.0.2latest on npm
Audit
Dependencies
prettieroptionalpeer dependency for parse/format utilities
Agent activity
12 hits · last 30 days
node
10
Amazon
1
Resources
x-formatter — npm install x-formatter · libregistry