0.1.0 • Published 7 years ago
more-prettier v0.1.0
more-prettier
CLI for running prettier with opinionated defaults.
Install
Install globally with npm
$ npm install --global more-prettier
Usage
# overwrites foo.js
$ fix foo.js
# write to a different destination file
$ fix foo.js bar.js
Options
Defaults used:
var defaults = {
// Indent lines with tabs
useTabs: false,
// Fit code within this line limit
printWidth: 80,
// Number of spaces it should use per tab
tabWidth: 2,
// If true, will use single instead of double quotes
singleQuote: true,
// Controls the printing of trailing commas wherever possible. Valid options:
// 'none' - No trailing commas
// 'es5' - Trailing commas where valid in ES5 (objects, arrays, etc)
// 'all' - Trailing commas wherever possible (function arguments)
//
// NOTE: Above is only available in 0.19.0 and above. Previously this was
// a boolean argument.
trailingComma: 'none',
// Controls the printing of spaces inside object literals
bracketSpacing: true,
// If true, puts the `>` of a multi-line jsx element at the end of
// the last line instead of being alone on the next line
jsxBracketSameLine: false,
// Which parser to use. Valid options are 'flow' and 'babylon'
parser: 'babylon',
// Whether to add a semicolon at the end of every line (semi: true),
// or only at the beginning of lines that may introduce ASI failures (semi: false)
semi: true
};
About
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Building docs
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running tests
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
Author
Jon Schlinkert
License
Copyright © 2017, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on May 05, 2017.
0.1.0
7 years ago