Formatter and linter for FTE template files (.nhtml). Stable version 3.0.0 is in development (canary). Provides an importable API (format, lint) and a CLI (fte-format). Parser-backed checks when available, with safe fallbacks. Key differentiators: opinionated formatting rules specific to FTE templates, conservative to avoid breaking semantics, and support for both CLI and programmatic usage.
npm install fte.js-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to import and use format and lint functions on a simple template.
Use fte-format in scripts; check npx fte-format.
Use format and lint as named exports in v3.
Install fte.js-parser as optional peer dependency to enable full checks.
Pass { indent: 'tab' } in options.Test with your templates and report false positives/negatives.
Run 'npm install -D fte.js-formatter' and ensure 'type': 'module' in package.json or use .mjs extension.
Use 'import { format } from 'fte.js-formatter''.Use 'npx fte-format' or install package locally and run via npx.