3.0.0 • Published 2 years ago

mj-pa v3.0.0

Weekly downloads
6
License
MIT
Repository
github
Last release
2 years ago

mj-pa

code style: prettier | Known Vulnerabilities

👉 FUN FACT: mj-pa is short for make-javascript-pretty-again— because what javascript developer doesn't love a good one-liner? 😎


about

mj-pa is a custom Prettier config tailored to format JS, JSON, & JSX code. Best results will be realized when mj-pa is used to extend Prettier in a React- or Vue-based environment.

View on RunKit

Naturally opinionated, mj-pa was derived from and directly extends the almost equally opinionated Prettier formatting tool.

output of `.prettierrc.json` output of .prettierrc.json


usage

IMPORTANT: You must have Prettier installed in your project for mj-pa to work properly.

installation

Using npm

npm install --save-dev mj-pa

Using yarn

yarn add -D mj-pa

configure

Edit the package.json file for your project to extend Prettier with mj-pa. Or, to be more specific, copy the following line of code and paste it underneath the version line of your project's package.json file in the root directory.

{
 "prettier": "mj-pa"
}

run

nothing changes here, run the check or write command as you normally would

npx prettier --check .
npx prettier --write .

output

Here is an example of how your VSCode logs will appear when mj-pa is used to extend the default configuration so formatting can be applied in turn by the VS Code plugin for Prettier.

Sample VSCode log output...mj-pa is extending the default configuration and formatting is being applied by the VS Code plugin for Prettier.


If you have any questions, comments, or suggestions, you can open a pull request or drop me an email

To learn more about how Prettier works, or to create your own configuration file, you can reference the Prettier documentation