0.0.1 • Published 4 years ago
prettier-plugin-x-standard v0.0.1
prettier-plugin-x-standard
Fork of prettier-plugin-x, with defaults
updated to match "Standard JS" formatting standards.
Supported parsers:
Requires explicit configuration of parser. Recommended configuation helper:
Sample formatting according to "Standard JS":
function * a () {}
console.log(typeof a)Note that for the non-Babel x-typescript parser this plugin uses the TypeScript parser that is bundled with stock Prettier.
Installation
with Yarn (recommended):
yarn add --dev prettier-plugin-xor with npm:
npm install --save-dev prettier-plugin-xSample usage
prettier --parser=x-babel --check sample.jswith babel-ts parser:
prettier --parser=x-babel-ts --check sample.jsor with the TypeScript parser:
prettier --parser=x-typescript --check sample.jswith babel-flow parser:
prettier --parser=x-babel-flow --check sample.jsNote that the --plugin option is not needed if this plugin is installed as a peer of Prettier.
Thanks and credits
- Thanks to
@prettier/plugin-phpfor an easy-to-understand Prettier plugin, which helped with the initial structure of this Prettier plugin.
0.0.1
4 years ago