Registry / testing / lang-rome-formatter-ir

lang-rome-formatter-ir

JSON →
library0.0.2jsnpmunverified

A CodeMirror 6 language mode that provides syntax highlighting and code editing support for the Rome formatter intermediate representation (IR). This package is at an early, unstable version (0.0.2) with slow or inactive release cadence. Unlike general-purpose CodeMirror modes, this one is purpose-built for the Rome IR format used in the Rome formatter's internal representation. It ships TypeScript definitions and is intended for integration with CodeMirror 6 projects that need to inspect or debug Rome's formatter IR.

npm install lang-rome-formatter-ir
INSTALL
IMPORT
SIG · LANG-ROME-FORMATTE
L
lang-rome-formatter-ir
testingjavascriptv0.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.

romeIR
import { romeIR } from 'lang-rome-formatter-ir'
const romeIR = require('lang-rome-formatter-ir')
Package is ESM-only; CommonJS require will fail.
RomeIRLanguage
import { RomeIRLanguage } from 'lang-rome-formatter-ir'
import RomeIRLanguage from 'lang-rome-formatter-ir'
Named export, not default.
romeIRCompletion
import { romeIRCompletion } from 'lang-rome-formatter-ir'
Autocompletion source for the mode, available as named export.

Initializes a CodeMirror 6 editor with the Rome formatter IR language mode for syntax highlighting.

import { EditorView, basicSetup } from 'codemirror'; import { romeIR } from 'lang-rome-formatter-ir'; new EditorView({ doc: '// Example Rome IR\nRoot0 = SourceFile', extensions: [basicSetup, romeIR()], parent: document.body });
Debug
Known issues
gotchaPackage is very early (v0.0.2) and may have breaking changes with minor version bumps.
fix
Pin to exact version or expect updates.
affects: <=0.0.2
gotchaESM-only: no CommonJS export. Node.js require() will throw ERR_REQUIRE_ESM.
fix
Use dynamic import() or set type: module in package.json.
affects: >=0.0.1
deprecatedRome project has been renamed to Biome; this package may not be maintained in the future.
fix
Consider migrating to Biome-compatible alternatives if available.
affects: all
Errors
Common errors & fixes
The module 'lang-rome-formatter-ir' does not provide a CommonJS export
Package is ES module only.
fix
Use import instead of require, or set package.json type: module.
romeIR is not a function
romeIR is a LanguageSupport instance, not a function; it may need to be called if it's a factory.
fix
Ensure you're using the named export correctly: import { romeIR } from 'lang-rome-formatter-ir' and then use romeIR() if it's a function.
Upgrade
Version history
0.0.2latest on npm
Audit
Dependencies
codemirroroptionalCore CodeMirror 6 dependency for language support and editor functionality.
Agent activity
2 hits · last 30 days
node
2
Resources
lang-rome-formatter-ir — npm install lang-rome-formatter-ir · libregistry