# tslint-config-prettier

> Do you wanna use tslint and prettier without conflicts? tslint-config-prettier disables all conflicting rules that may cause such problems. Prettier takes care of formatting and tslint the rest.

Latest version **1.18.0** (published 2019-02-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install tslint-config-prettier
pnpm add tslint-config-prettier
yarn add tslint-config-prettier
bun add tslint-config-prettier
```

Provides the command `tslint-config-prettier-check`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.18.0 |
| Published | 2019-02-04 |
| First published | 2017-06-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.0.0 |
| Dependencies | 0 |
| Unpacked size | 13.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1226 |
| Author | Alex Jover Morales |
| Maintainers | alexjoverm |
| Keywords | lint, tslint, ts-lint, prettier, config, typescript |

## Links

- npm: https://www.npmjs.com/package/tslint-config-prettier
- Repository: https://github.com/prettier/tslint-config-prettier
- Homepage: https://github.com/prettier/tslint-config-prettier#readme
- Issues: https://github.com/prettier/tslint-config-prettier/issues
- npm.io page: https://npm.io/package/tslint-config-prettier

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 1.18.0 (latest) — 2019-02-04
- 1.17.0 — 2018-11-27
- 1.16.0 — 2018-11-13
- 1.15.0 — 2018-08-20
- 1.14.0 — 2018-07-20
- 1.13.0 — 2018-05-20
- 1.12.0 — 2018-04-19
- 1.11.0 — 2018-04-19
- 1.10.0 — 2018-03-12
- 1.9.0 — 2018-02-25
- 1.8.0 — 2018-02-15
- 1.7.0 — 2018-02-01
- 1.6.0 — 2017-10-17
- 1.5.0 — 2017-09-01
- 1.4.0 — 2017-08-27
- … 4 more at https://npm.io/package/tslint-config-prettier/versions

## README

# tslint-config-prettier

[![npm](https://img.shields.io/npm/v/tslint-config-prettier.svg)](https://www.npmjs.com/package/tslint-config-prettier)
[![Travis](https://img.shields.io/travis/alexjoverm/tslint-config-prettier.svg)](https://travis-ci.org/prettier/tslint-config-prettier)
[![downloads](https://img.shields.io/npm/dm/tslint-config-prettier.svg)](https://www.npmjs.com/package/tslint-config-prettier)
[![dependencies Status](https://img.shields.io/david/prettier/tslint-config-prettier.svg)](https://david-dm.org/prettier/tslint-config-prettier)
[![devDependencies Status](https://img.shields.io/david/dev/prettier/tslint-config-prettier.svg)](https://david-dm.org/prettier/tslint-config-prettier?type=dev)

<h3> :cop: TSLint  +  :nail_care: Prettier = :heart_eyes: </h3>

Do you want to use [TSLint](https://palantir.github.io/tslint/) and [Prettier](https://github.com/prettier/prettier) without conflicts? `tslint-config-prettier` disables all [conflicting rules](https://unpkg.com/tslint-config-prettier) that may cause such problems. Prettier takes care of the formatting whereas tslint takes care of all the other things.

> Check how it works in **[this tutorial](https://alexjoverm.github.io/2017/06/12/Use-Prettier-with-TSLint-and-be-happy/)**.

### Get started

```bash
yarn add --dev tslint-config-prettier
# or
npm install --save-dev tslint-config-prettier
```

Make sure you've already set up [TSLint](https://palantir.github.io/tslint/) and [Prettier](https://github.com/prettier/prettier).

Then, extend your `tslint.json`, and make sure `tslint-config-prettier` is **at the end**:

```json
{
  "extends": [
    "tslint:latest",
    "tslint-config-prettier"
  ]
}
```

### More configuration

`tslint-config-prettier` also turns off formatting rules from the following rulesets, so you can use them safely.

- [codelyzer](https://github.com/mgechev/codelyzer)
- [tslint](https://github.com/palantir/tslint)
- [tslint-consistent-codestyle](https://github.com/ajafff/tslint-consistent-codestyle)
- [tslint-divid](https://github.com/jonaskello/tslint-divid)
- [tslint-eslint-rules](https://github.com/buzinas/tslint-eslint-rules)
- [tslint-immutable](https://github.com/jonaskello/tslint-immutable)
- [tslint-microsoft-contrib](https://github.com/Microsoft/tslint-microsoft-contrib)
- [tslint-misc-rules](https://github.com/jwbay/tslint-misc-rules)
- [tslint-react](https://github.com/palantir/tslint-react)
- [vrsource-tslint-rules](https://github.com/vrsource/vrsource-tslint-rules)

```json
{
  "extends": [
    "tslint:latest",
    "tslint-react",
    "tslint-eslint-rules",
    "tslint-config-prettier"
  ]
}
```

### CLI helper tool

`tslint-config-prettier` is shipped with a little CLI tool to help you check if your configuration contains any rules that are in conflict with Prettier. (require `tslint` installed)

In order to execute the CLI tool, first add a script for it to `package.json`:

```json
{
  "scripts": {
    "tslint-check": "tslint-config-prettier-check ./tslint.json"
  }
}
```

Then run `yarn tslint-check` or `npm run tslint-check`.

### Tutorials

- [Using TSlint with Prettier](https://alexjoverm.github.io/2017/06/12/Use-Prettier-with-TSLint-and-be-happy/)
- [Use Prettier with TSLint without conflicts (video)](https://egghead.io/lessons/typescript-use-prettier-with-tslint-without-conflicts-c39670eb/)

### Contributing

Please read [CONTRIBUTING.md](https://github.com/prettier/tslint-config-prettier/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.

### Related

- [tslint-plugin-prettier](https://github.com/ikatyang/tslint-plugin-prettier) - Runs Prettier as a TSLint rule and reports differences as individual TSLint issues.

### Credits

Made with :heart: by [@alexjoverm](https://twitter.com/alexjoverm) and all its [contributors](https://github.com/prettier/tslint-config-prettier/graphs/contributors)

---
_Source: https://npm.io/package/tslint-config-prettier · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
