@frontboi/prettier-plugin-ramses-style
v1.0.13
Published
Pretty your javascript and typescript project to Ramses style.
Downloads
30
Maintainers
Readme
A Prettier plugin to help you format Javascript and Typescript projects in a Ramses style easily.
Intro
Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.
Install
npm install -D @frontboi/prettier-plugin-ramses-style
You then need to configure your .prettierrc.json
:
{
"plugins": ["@frontboi/prettier-plugin-ramses-style"]
}
How it works
A Prettier plugin must first parse the source code of the target language into a traversable data structure (Usually an Abstract Syntax Tree) and then print out that data structure in a "pretty" style.
‼️ A prettier plugin MUST be developped in CommonJS
.
Testing
You can try this package on a file using this custom script:
npm run prettify -- test/fixtures/comments.js
Useful links
AST explorer Babel AST explorer) Simple tutorial
Support
You can create a PR on this project and I will review it. If you prefer, you can contact me on Linkedin or by email ([email protected]).
Tom Blanchet - 2024