prettier-plugin-xcbasic
v0.1.1
Published
Totally vibecoded Prettier plugin for XC=BASIC (.bas) source files
Maintainers
Readme
prettier-plugin-xcbasic
Totally vibecoded Prettier plugin for formatting XC=BASIC source files (.bas).
What it formats
- keyword casing (
upper,lower, orpreserve) - spacing around commas and operators (
=,<,>,<=,>=,<>,+,-,*,/) - unary sign handling (keeps
-x,+x,a * -b,1e-3readable without breaking exponent notation) - statement separators (
:) as" : " - indentation for common block structures (
IF ... THEN,FOR,DO,SELECT CASE,TYPE,FUNCTION,SUB) - preserves
ASM ... END ASMblock contents (only trims trailing whitespace)
Install
npm install --save-dev prettier prettier-plugin-xcbasicUse
npx prettier --plugin prettier-plugin-xcbasic --write "**/*.bas"Or in .prettierrc:
{
"plugins": ["prettier-plugin-xcbasic"],
"xcBasicKeywordCase": "upper",
"xcBasicIndentSize": 2
}Options
xcBasicKeywordCase:upper(default),lower,preservexcBasicIndentSize: integer spaces for indent (default:2)
Validation
npm test
npm run test:corpusnpm testruns fixture-based regression tests and idempotency checks.npm run test:corpusvalidates idempotency across../examples/**/*.bas.
Release checklist
- Run
npm run test:allon a clean checkout. - Review
examples/formatting diff before tagging. - Publish as a beta first (
0.1.0-beta.x), then promote to stable after user feedback.
