# eslint-config-leaero

> Shareable ESLint and Prettier config from Leandro Argentiero

Latest version **1.1.0** (published 2023-09-06) · MIT license · 0 weekly downloads

## Install

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

## 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.0 |
| Published | 2023-09-06 |
| First published | 2023-02-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 13 |
| Unpacked size | 12.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Leandro Argentiero |
| Maintainers | jens.cappelle, leaero |
| Keywords | javascript, typescript, ecmascript, eslint, eslint-config, lint, airbnb, config, prettier |

## Links

- npm: https://www.npmjs.com/package/eslint-config-leaero
- Repository: git@github.com:leandroargentiero/eslint-config-leaero
- npm.io page: https://npm.io/package/eslint-config-leaero

## Dependencies (13)

- [eslint-plugin-react](https://npm.io/package/eslint-plugin-react.md) ^7.32.2
- [eslint-config-airbnb](https://npm.io/package/eslint-config-airbnb.md) ^19.0.4
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) ^2.27.5
- [eslint-config-prettier](https://npm.io/package/eslint-config-prettier.md) ^8.6.0
- [eslint-plugin-jsx-a11y](https://npm.io/package/eslint-plugin-jsx-a11y.md) ^6.7.1
- [eslint-plugin-prettier](https://npm.io/package/eslint-plugin-prettier.md) ^4.2.1
- [@typescript-eslint/parser](https://npm.io/package/@typescript-eslint/parser.md) ^5.52.0
- [eslint-config-airbnb-base](https://npm.io/package/eslint-config-airbnb-base.md) ^15.0.0
- [eslint-plugin-react-hooks](https://npm.io/package/eslint-plugin-react-hooks.md) ^4.6.0
- [eslint-config-airbnb-typescript](https://npm.io/package/eslint-config-airbnb-typescript.md) ^17.0.0
- [@typescript-eslint/eslint-plugin](https://npm.io/package/@typescript-eslint/eslint-plugin.md) ^5.52.0
- [eslint-plugin-simple-import-sort](https://npm.io/package/eslint-plugin-simple-import-sort.md) ^10.0.0
- [eslint-import-resolver-typescript](https://npm.io/package/eslint-import-resolver-typescript.md) ^3.5.3

## 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.1.0 (latest) — 2023-09-06
- 1.0.1 — 2023-02-19
- 1.0.0 — 2023-02-19

## README

# eslint-config-leaero

Shareable ESLint and Prettier config.

## Quickstart

Start with installing the library and its necessary peer dependencies.

```js
yarn add --dev eslint-config-leaero eslint prettier
```

## Prettier Integration

This library is automatically configured with Prettier by adding it as a rule to ESLint. You just need to add a `.prettierrc` file to your project and add your own custom formatting rules.

## Available Configurations

You can choose between different configurations that suit the technology stack of your project. All configurations extend from a base config.

| Name                      | Description                                                |
| ------------------------- | ---------------------------------------------------------- |
| `leaero`                  | Base configuration for projects that use plain JavaScript. |
| `leaero/react`            | Configuration for React projects that use Babel.           |
| `leaero/typescript`       | Configuration for Node projects that use TypeScript.       |
| `leaero/react-typescript` | Configuration for React projects that use Typescript.      |
| `leaero/next-typescript`  | Configuration for Next.js projects that use Typescript.    |

### `leaero`

Base configuration for projects that use plain JavaScript.

Required packages:

- @babel/core
- @babel/eslint-parser
- eslint-config-airbnb-base
- eslint-config-prettier
- eslint-plugin-import
- eslint-plugin-simple-import-sort

```js
yarn add --dev @babel/core @babel/eslint-parser eslint-config-airbnb-base eslint-config-prettier eslint-plugin-import eslint-plugin-simple-import-sort
```

Add it to your `eslintrc.js`.

```js
module.exports = {
  extends: ['leaero'],
};
```

### `leaero/react`

Configuration for React projects that use Babel.

Required packages:

- Packages from `leaero`
- eslint-plugin-react
- eslint-plugin-react-hooks
- eslint-plugin-jsx-a11y

```js
yarn add --dev @babel/core @babel/eslint-parser eslint-config-airbnb-base eslint-config-prettier eslint-plugin-import eslint-plugin-simple-import-sort eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-jsx-a11y

```

Add it to your `eslintrc.js`.

```js
module.exports = {
  extends: ['leaero/react'],
};
```

### `leaero/typescript`

Configuration for Node projects that use TypeScript.

Required packages:

- Packages from `leaero` except for `@babel/core` and `@babel/eslint-parser`
- `eslint-config-airbnb-typescript`
- `@typescript/eslint/eslint-plugin`
- `@typescript-eslint/parser`
- `eslint-import-resolver-typescript`

```js
yarn add --dev eslint-config-airbnb eslint-config-prettier eslint-plugin-import eslint-plugin-simple-import-sort eslint-config-airbnb-typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-import-resolver-typescript
```

Add it to your `eslintrc.js`.

```js
module.exports = {
  extends: ['leaero/typescript'],
};
```

### `leaero/react-typescript`

Configuration for React projects that use TypeScript.

Required packages:

- Packages from `leaero` except for `@babel/core` and `babel/eslint-parser`
- Packages from `leaero/react`
- Packages from `leaero/typescript`

```js
yarn add --dev eslint-config-airbnb eslint-config-prettier eslint-plugin-import eslint-plugin-simple-import-sort eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-jsx-a11y  eslint-config-airbnb-typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-import-resolver-typescript

```

Add it to your `eslintrc.js`.

```js
module.exports = {
  extends: ['leaero/react-typescript'],
};
```

### `leaero/next-typescript`

Configuration for Next.js projects that use TypeScript.

Required packages:

- Packages from `leaero` except for `@babel/core` and `@babel/eslint-parser`
- Packages from `leaero/react-typescript`
- @next/eslint-plugin-next

```js
yarn add --dev eslint-config-airbnb eslint-config-prettier eslint-plugin-import eslint-plugin-simple-import-sort eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-jsx-a11y  eslint-config-airbnb-typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-import-resolver-typescript @next/eslint-plugin-next
```

Add it to your `eslintrc.js`.

```js
module.exports = {
  extends: ['leaero/typescript-next'],
};
```

## Make VS Code lint and fix for you

If you want your code editor lint and fix for you on save, you should add these instructions to your workbench or project `settings.json`

```json
{
  // auto-save configs
  "editor.formatOnSave": true,
  // turn it off for JS, JSX, TS and TSX, we will do this via eslint
  "[javascript][javascriptreact][typescript][typescriptreact]": {
    "editor.formatOnSave": false
  },
  // tell the ESLint plugin to run on save
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  }
}
```

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