# eslint-config-typescript-airbnb-prettier

> An eslint configuration that integrates eslint-config-airbnb-base, eslint-config-airbnb-typescript-base, @typescript-eslint/eslint-plugin and eslint-config-prettier

Latest version **1.1.5** (published 2022-06-02) · BSD-3-Clause license · 0 weekly downloads

## Install

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

## 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.1.5 |
| Published | 2022-06-02 |
| First published | 2021-09-24 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 5 |
| Unpacked size | 168.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Shane Lucy |
| Maintainers | shanelucy |
| Keywords | eslint, typescript-eslint, eslint-config-airbnb-base, eslint-config-airbnb-typescript, @typescript-eslint/eslint-plugin, prettier, prettier-eslint |

## Links

- npm: https://www.npmjs.com/package/eslint-config-typescript-airbnb-prettier
- Repository: https://github.com/ShaneLucy/eslint-config-typescript
- npm.io page: https://npm.io/package/eslint-config-typescript-airbnb-prettier

## Dependencies (5)

- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) ^2.24.2
- [eslint-config-prettier](https://npm.io/package/eslint-config-prettier.md) ^8.1.0
- [@typescript-eslint/parser](https://npm.io/package/@typescript-eslint/parser.md) ^4.30.0
- [eslint-config-airbnb-base](https://npm.io/package/eslint-config-airbnb-base.md) ^14.2.1
- [eslint-config-airbnb-typescript](https://npm.io/package/eslint-config-airbnb-typescript.md) ^14.0.0

## 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
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 1.1.5 (latest) — 2022-06-02
- 1.1.4 — 2022-06-02
- 1.1.2 — 2021-12-12
- 1.1.0 — 2021-10-18
- 1.0.5 — 2021-10-18
- 1.0.4 — 2021-09-30
- 1.0.3 — 2021-09-28
- 1.0.2 — 2021-09-24
- 1.0.1 — 2021-09-24
- 1.0.0 — 2021-09-24

## README

[![package version](https://img.shields.io/npm/v/eslint-config-typescript-airbnb-prettier?logo=npm&logoWidth=20)](https://img.shields.io/npm/v/eslint-config-typescript-airbnb-prettier?logo=npm&logoWidth=20) [![package weekly downloads](https://img.shields.io/npm/dw/eslint-config-typescript-airbnb-prettier)](https://img.shields.io/npm/dw/eslint-config-typescript-airbnb-prettier?logo=npm&logoWidth=20) [![supported versions of node](https://img.shields.io/node/v/eslint-config-typescript-airbnb-prettier?logo=npm&logoWidth=20)](https://img.shields.io/node/v/eslint-config-typescript-airbnb-prettier?logo=npm&logoWidth=20) [![package vulnerabilities](https://img.shields.io/snyk/vulnerabilities/npm/eslint-config-typescript-airbnb-prettier?logo=snyk&logoWidth=20)](https://img.shields.io/snyk/vulnerabilities/npm/eslint-config-typescript-airbnb-prettier?logo=snyk&logoWidth=20)

# Eslint, Airbnb, Typescript & Prettier Configuration

An eslint configuration that integrates the following into one package for easy installation and setup:

- [eslint-config-airbnb-base](https://www.npmjs.com/package/eslint-config-airbnb)
- [eslint-config-airbnb-typescript-base](https://www.npmjs.com/package/eslint-config-airbnb-typescript)
- [@typescript-eslint/eslint-plugin](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin)
- [prettier](https://www.npmjs.com/package/prettier/v/2.2.1)
- [eslint-config-prettier](https://www.npmjs.com/package/eslint-config-prettier)
- [eslint-plugin-import](https://preview.npmjs.com/package/eslint-plugin-import)

## Assumptions

1. You have typescript installed
1. You have a `tsconfig.json` in your project root
1. You have installed a version of Node greater than 8
1. You have installed npm version 7 or greater

## Installation

> If you aren't using npm version greater than 7 you will have to manually install these dependencies:
>
> - eslint
> - prettier
> - @typescript-eslint/eslint-plugin
>
> Copy everything inside the peer dependencies object [here](https://github.com/ShaneLucy/eslint-config-typescript/blob/master/package.json) and paste it into your dev dependencies object. _This will ensure you have the correct versions installed_

Install with npm

```bash
npm install --save-dev eslint-config-typescript-airbnb-prettier
```

## Setup

Create a .eslintrc.js file in your project root

```bash
touch .eslintrc.js
```

Paste the following into `.eslintrc.js`

```javascript
module.exports = {
  extends: "typescript-airbnb-prettier",
};
```

Add the following commands into the scripts object in your `package.json`

```json
"lint": "prettier --write . && eslint src/**",
"lint-fix": "prettier --write . && eslint src/** --fix"
```

An example scripts object might look like this

```json
"scripts": {
  "dev": "vite",
  "build": "tsc && vite build",
  "serve": "vite preview",
  "lint": "prettier --write . && eslint src/**",
  "lint-fix": "prettier --write . && eslint src/** --fix"
},
```

Create an `.eslintignore` in your project root

```
touch .eslintignore
```

Paste the following into `.eslintignore`

```
.eslintrc.js
node_modules/**
```

Create an `.prettierignore` in your project root

```
touch .prettierignore
```

Paste the following into `.prettierignore`

```
node_modules/*
```

## Usage

```bash
npm run lint
```

or to make eslint auto fix any issues it's capable of fixing

```bash
npm run lint-fix
```

## Customisation

This eslint config can be [altered and extended](https://eslint.org/docs/user-guide/configuring/) by editing `.eslintrc.js`

Prettier can be [altered and extended](https://prettier.io/docs/en/options.html) by creating and modifying `.prettierrc`

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