# eslint-config-typescript

> A base set of recommended ESLint rules for TypeScript projects

Latest version **3.0.0** (published 2019-07-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-config-typescript
pnpm add eslint-config-typescript
yarn add eslint-config-typescript
bun add eslint-config-typescript
```

## 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 | 3.0.0 |
| Published | 2019-07-05 |
| First published | 2017-09-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Patricio Trevino |
| Maintainers | weirdpattern |
| Keywords | eslint, config, eslintconfig, eslint-config, typescript, prettier, react |

## Links

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

## 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

- 3.0.0 (latest) — 2019-07-05
- 2.0.0 — 2019-02-12
- 1.1.0 — 2018-06-26
- 1.0.2 — 2017-09-12
- 1.0.1 — 2017-09-12
- 1.0.0 — 2017-09-11

## README

# eslint-config-typescript
An opinionated set of ESLint rules for TypeScript projects

## Installation
Install eslint-config-typescript:

```bash
$ npm install --save-dev eslint-config-typescript
```

Then, add eslint-config-typescript to the "extends" array in your ESLint file. 
Make sure to put it last, so it gets the chance to override other configs.

```json
{
  "extends": [
    "typescript"
  ]
}
```

A few ESLint plugins are supported as well:
```json
{
  "extends": [
    "typescript",
    "typescript/react",
    "typescript/prettier",
    "typescript/prettier-react"
  ]
}
```

Note: `typescript/prettier-react` will automatically import `typescript/prettier`.

## Example configuration
Using default prettier configurations:
```json
{
  "extends": [
    "typescript",
    "typescript/prettier"    
  ],
  "plugins": ["filenames", "jest"],
  "env": {    
    "jest": true,
    "node": true
  },
  "rules": {
    "filenames/no-index": "error",
    "filenames/match-exported": ["error", "kebab"],
    "jest/no-disabled-tests": "error",
    "jest/no-focused-tests": "error",
    "jest/no-identical-title": "error",
    "jest/valid-expect": "error"
  }
}
```

Using specific react configurations:
```json
{
  "extends": [
    "typescript",
    "typescript/react",
    "typescript/prettier-react"
  ],
  "plugins": ["filenames", "jest"],
  "env": {    
    "jest": true,
    "node": true
  },
  "rules": {
    "filenames/no-index": "error",
    "filenames/match-exported": ["error", "kebab"],
    "jest/no-disabled-tests": "error",
    "jest/no-focused-tests": "error",
    "jest/no-identical-title": "error",
    "jest/valid-expect": "error",
    "prettier/prettier": [
      "error",
      {
        "semi": false,
        "tabWidth": 4,
        "singleQuote": true
      }
    ]
  }
}
```

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