prettier-plugin-x-babel

0.0.2 • Public • Published

prettier-plugin-x-babel

LICENSE npm package

A fork of prettier-plugin-x which uses Babel and prettierX by default for ES languages JavaScript, Flow, and TypeScript, all in a Prettier plugin.

Includes options from prettierX for improved parity with "Standard JS", for example:

function * a () {}

console.log(typeof a)

with the following .prettierrc configuration:

{
  semi: false,
  generatorStarSpacing: true,
  spaceBeforeFunctionParen: true
}

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 --config ./sample-prettierx-prettierrc --check sample.js

to specify TypeScript via babel-ts parser:

prettier --config ./sample-prettierx-prettierrc --parser=typescript --check sample.js

or:

prettier --config ./sample-prettierx-prettierrc --parser=babel-ts --check sample.js

to specify Flow via babel-flow parser:

prettier --config ./sample-prettierx-prettierrc --parser=flow --check sample.js

or:

prettier --config ./sample-prettierx-prettierrc --parser=babel-flow --check sample.js

Thanks and credits

Readme

Keywords

none

Package Sidebar

Install

npm i prettier-plugin-x-babel

Weekly Downloads

1

Version

0.0.2

License

(MIT OR Apache-2.0)

Unpacked Size

17 kB

Total Files

5

Last publish

Collaborators

  • brodybits