.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / prettier-tslint / README.md
1 # prettier-tslint
2
3 Formats your TypeScript using [`prettier`](https://github.com/prettier/prettier)
4 followed by [`tslint --fix`](https://github.com/palantir/tslint).
5
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)
11
12 ## Install
13
14 With `npm`:
15
16 ```bash
17 npm install --save-dev prettier-tslint
18 ```
19
20 Or with `yarn`:
21
22 ```bash
23 yarn add --dev prettier-tslint
24 ```
25
26 `prettier-tslint` allows you to install your own version of `prettier` and
27 `typescript`, so make sure you've installed them, too.
28
29 ## Configuration
30
31 `prettier-tslint` find and will respect:
32
33 * `prettier`'s `.prettierrc`, or any other config file such as `package.json`.
34 * `prettier`'s `.prettierignore` file.
35 * `tslint`'s `tslint.json`.
36
37 `prettier-tslint` has no additional configuration.
38
39 ## CLI
40
41 ```
42 Commands:
43   fix    Fix one or more files
44   check  List files that aren't formatted
45
46 Options:
47   --version  Show version number                                       [boolean]
48   --help     Show help                                                 [boolean]
49
50 Examples:
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
54 ```
55
56 ## API
57
58 ```js
59 import { fix, check } from "prettier-tslint";
60
61 check("file.ts"); // -> false
62 fix("file.ts");
63 check("file.ts"); // -> true
64 ```
65
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.
67
68 ## Contributing
69
70 See [`CONTRIBUTING.md`](CONTRIBUTING.md)