prettier-plugin-x-babel-standard
v0.0.1
Published
Fork of prettier-plugin-x / prettier-plugin-x-babel / prettier-plugin-x-standard using Babel + prettierX, with defaults updated to match "Standard JS" formatting
Downloads
3
Readme
prettier-plugin-x-babel-standard
Fork of prettier-plugin-x-babel
/ prettier-plugin-x-babel
/ prettier-plugin-x-standard
,
with defaults updated to match "Standard JS" formatting standards,
using Babel and prettierX
by default for ES languages JavaScript, Flow, and TypeScript, all in a
Prettier plugin.
Sample formatting according to "Standard JS":
function * a () {}
console.log(typeof a)
Installation
with Yarn (recommended):
yarn add --dev prettier-plugin-x-babel
or with npm:
npm install --save-dev prettier-plugin-x-babel
Sample usage
prettier --check sample.js
to specify TypeScript via babel-ts
parser:
prettier --parser=typescript --check sample.js
or:
prettier --parser=babel-ts --check sample.js
to specify Flow via babel-flow
parser:
prettier --parser=flow --check sample.js
or:
prettier --parser=babel-flow --check sample.js
Thanks and credits
- Based on:
prettier-plugin-x
- Thanks to https://github.com/prettier/plugin-php for an easy-to-understand Prettier plugin, which helped with the initial structure of this Prettier plugin.