npm.io
0.0.1 • Published 5 years ago

prettier-plugin-x-babel-standard

Licence
(MIT OR Apache-2.0)
Version
0.0.1
Deps
1
Size
17 kB
Vulns
0
Weekly
0

prettier-plugin-x-babel-standard

LICENSE npm package

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