Registry / testing / assemblyscript-prettier

assemblyscript-prettier

JSON →
library3.0.4jsnpmunverified

Prettier plugin for formatting AssemblyScript files (.as, .ts). Current stable version 3.0.4, compatible with Prettier 3.x only. Provides syntax-aware formatting for AssemblyScript, supporting comments, indentation, and semicolons. Released under the wasm-ecosystem organization. Requires manual plugin configuration in .prettierrc. Key differentiator: enables Prettier-based formatting for AssemblyScript projects, leveraging Prettier's plugin system. Release cadence: minor updates as needed; last release Feb 2024.

testing
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.

Plugin is loaded automatically by Prettier when specified in configuration. No explicit import required.

// In .prettierrc: { "plugins": ["assemblyscript-prettier"] }

Install Prettier 3 and the plugin, configure .prettierrc, and format an AssemblyScript file.

npm i -D prettier@^3.0.0 assemblyscript-prettier echo '{ "plugins": ["assemblyscript-prettier"] }' > .prettierrc echo 'export function add(a: i32, b: i32): i32 { return a + b }' > example.as npx prettier --write example.as
Debug
Known footguns
breakingVersion 3.0.0 dropped support for Prettier 2. Use version 1.x for Prettier 2.
gotchaPlugin must be listed in Prettier config as a string; ESM-only packages may require dynamic import if used programmatically.
gotchaAssemblyScript files must have .as extension or be explicitly included in Prettier's file matcher.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
0 hits · last 30 days

No traffic data recorded yet.

Resources