Registry / devops / prettier-plugin-tempblot

prettier-plugin-tempblot

JSON →
library0.2.0jsnpmunverified

A Prettier plugin that formats Tempblot template files. Current version is 0.2.0, released with a monthly cadence. It integrates seamlessly with Prettier's existing architecture to provide consistent formatting for Tempblot syntax. Key differentiators include native support for Tempblot-specific constructs and zero-config setup for Tempblot projects.

npm install prettier-plugin-tempblot
INSTALL
IMPORT
SIG · PRETTIER-PLUGIN-TE
P
prettier-plugin-tempblot
devopsjavascriptv0.2.0
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 (Plugin)
module.exports = require('prettier-plugin-tempblot');
import plugin from 'prettier-plugin-tempblot'; // Incorrect for CommonJS without ESM bundler
CommonJS require is the standard approach for Prettier plugins.
prettier.config resolution
// .prettierrc { "plugins": ["prettier-plugin-tempblot"] }
// Using wrong plugin name { "plugins": ["tempblot"] } // Must include 'prettier-plugin-' prefix
Plugin name in config must match npm package name exactly.
TypeScript types
import type { Plugin } from 'prettier'; // Use Prettier's built-in types; no separate types needed
import { PrettierPluginTempblot } from 'prettier-plugin-tempblot'; // No such export
This plugin does not export TypeScript types; use Prettier's Plugin type instead.

Install Prettier and the plugin, configure in .prettierrc, and format a Tempblot file.

// Install dependencies npm install --save-dev prettier prettier-plugin-tempblot // Create a test Tempblot file: example.tempblot // Content: {#if condition}Hello{#endif} // Create .prettierrc { "plugins": ["prettier-plugin-tempblot"] } // Format the file npx prettier --write example.tempblot // Expected output: {#if condition} Hello {#endif}
Debug
Known issues
breakingRequires Prettier >=3.0.0; not compatible with older versions.
fix
Upgrade Prettier to version 3.0.0 or higher.
affects: >=0.0.0
deprecatedPlugin is in early alpha; API may change in minor versions.
fix
Pin to exact version and test upgrades.
affects: <1.0.0
gotchaPlugin file extension detection may fail if file does not have .tempblot extension.
fix
Ensure input files use .tempblot extension, or override in config with `--tempblot-extensions` (if supported).
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'prettier-plugin-tempblot'
Plugin not installed or peer dependency unmet.
fix
Run `npm install --save-dev prettier-plugin-tempblot` and ensure Prettier >=3 is installed.
Could not resolve the parser: 'tempblot'
Plugin not configured correctly in Prettier config.
fix
Add `"plugins": ["prettier-plugin-tempblot"]` to your .prettierrc.
Upgrade
Version history
0.2.0latest on npm
Audit
Dependencies
prettierrequiredPeer dependency required for plugin to function; must be >=3.0.0.
Agent activity
4 hits · last 30 days
node
4
Resources
prettier-plugin-tempblot — npm install prettier-plugin-tempblot · libregistry