3 Formats your TypeScript using [`prettier`](https://github.com/prettier/prettier)
4 followed by [`tslint --fix`](https://github.com/palantir/tslint).
6 [![Travis](https://img.shields.io/travis/azz/prettier-tslint.svg?style=flat-square)](https://travis-ci.org/azz/prettier-tslint)
7 [![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
8 [![npm](https://img.shields.io/npm/v/prettier-tslint.svg?style=flat-square)](https://npmjs.org/prettier-tslint)
9 [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)
10 [![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE)
17 npm install --save-dev prettier-tslint
23 yarn add --dev prettier-tslint
26 `prettier-tslint` allows you to install your own version of `prettier` and
27 `typescript`, so make sure you've installed them, too.
31 `prettier-tslint` find and will respect:
33 * `prettier`'s `.prettierrc`, or any other config file such as `package.json`.
34 * `prettier`'s `.prettierignore` file.
35 * `tslint`'s `tslint.json`.
37 `prettier-tslint` has no additional configuration.
43 fix Fix one or more files
44 check List files that aren't formatted
47 --version Show version number [boolean]
48 --help Show help [boolean]
51 prettier-tslint fix file1.ts file2.ts Fix provided files
52 prettier-tslint fix '**/*.ts' Fix all TypeScript files
53 prettier-tslint check '**/*.ts' List all unformatted TypeScript files
59 import { fix, check } from "prettier-tslint";
61 check("file.ts"); // -> false
63 check("file.ts"); // -> true
66 Currently the `fix` function will write to disk and not return anything. This behavior **may change** in a minor release before `1.0.0` is released.
70 See [`CONTRIBUTING.md`](CONTRIBUTING.md)