# eslint-config-vinta

> Vinta's ESLint and Prettier Shareable Configs

Latest version **2.0.0** (published 2022-02-04) · MIT license · 0 weekly downloads

## Install

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

## 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 | 2.0.0 |
| Published | 2022-02-04 |
| First published | 2019-07-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 38.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 23 |
| Author | Vinta Software |
| Maintainers | victorfsf, vintasoftware |
| Keywords | vinta, vintasoftware, styleguide, guideline, prettier, eslint, eslintconfig, config, javascript, react, babel, es2015, es2016, es2017, es2018, es2019 |

## Links

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

## Dependencies (1)

- [confusing-browser-globals](https://npm.io/package/confusing-browser-globals.md) ^1.0.9

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

- 2.0.0 (latest) — 2022-02-04
- 1.4.5 — 2020-03-23
- 1.4.4 — 2020-03-18
- 1.4.3 — 2020-02-06
- 1.4.2 — 2020-02-04
- 1.4.1 — 2020-02-03
- 1.4.0 — 2020-01-31
- 1.3.0 — 2019-11-08
- 1.2.0 — 2019-09-06
- 1.1.1 — 2019-07-30
- 1.1.0 — 2019-07-18
- 1.0.0 — 2019-07-12

## README

# eslint-config-vinta

Vinta's [ESLint](http://eslint.org) and [Prettier](https://prettier.io/) shareable configs.

> This repository is under development and both ESLint and Prettier rules applied here are subject to change.

## Install

```bash
npm install eslint-config-vinta --save-dev
```

### Peer dependencies

Depending on the configurations you choose to use, you may not need to install every dependency listed here.

```bash
npm install \
  @babel/eslint-parser@~7.16.5 \
  @babel/eslint-plugin@~7.16.5 \
  eslint@~8.8.0 \
  eslint-config-prettier@~8.3.0 \
  eslint-plugin-import@~2.20.1 \
  eslint-plugin-jest@~26.0.0 \
  eslint-plugin-jsx-a11y@~6.5.1 \
  eslint-plugin-prettier@~4.0.0 \
  eslint-plugin-promise@~6.0.0 \
  eslint-plugin-react@~7.28.0 \
  eslint-plugin-react-hooks@~4.3.0 \
  eslint-plugin-sonarjs@~0.11.0 \
  eslint-plugin-unicorn@~40.1.0 \
  prettier@~2.5.1 \
  --save-dev
```

## Usage

This repository contains the configurations for both `ESLint` and `Prettier`, and each one of them handles shareable configurations differently.

### ESLint

For ESLint, your `.eslintrc` file should look (at least) like this:

> Keep in mind that ESLint ignores the `eslint-config-` prefix, so all you need to write is `vinta`.

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

If you're already using ESLint on your project, just add `'vinta'` to the `extends` property.

We also have a recommended configuration. It extends all plugins from the `plugins` folder and all the rules defined in the `rules` folder.

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

#### Selecting Plugins

If you're not using the recommended configuration (which includes all plugins), you can easily select your desired plugins:

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

*The base `vinta` configuration includes all ESLint rules, but no plugins.*

Possible plugin options:

- **vinta/plugins/babel** (from [@babel/eslint-plugin](https://github.com/babel/babel/tree/main/eslint/babel-eslint-plugin))
- **vinta/plugins/import** (from [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import))
- **vinta/plugins/jest** (from [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest))
- **vinta/plugins/jsx-a11y** (from [eslint-plugin-jsx-a11y](https://github.com/evcohen/eslint-plugin-jsx-a11y))
- **vinta/plugins/promise** (from [eslint-plugin-promise](https://github.com/xjamundx/eslint-plugin-promise))
- **vinta/plugins/react** (from [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react))
- **vinta/plugins/react-hooks** (from [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/master/packages/eslint-plugin-react-hooks))
- **vinta/plugins/sonar** (from [eslint-plugin-sonarjs](https://github.com/SonarSource/eslint-plugin-sonarjs))
- **vinta/plugins/unicorn** (from [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn))

You can learn more about ESLint's shareable configs [here](http://eslint.org/docs/developer-guide/shareable-configs).

### Prettier

For Prettier, add the following line to your `package.json` file:

```json
"prettier": "eslint-config-vinta/prettier",
```

And be sure to have the following packages installed:

```bash
npm install \
  eslint-config-prettier@~8.3.0 \
  eslint-plugin-prettier@~4.0.0 \
  prettier@~2.5.1 \
  --save-dev
```

If you already have a working configuration for your project, you can either ignore this step or extend our config in your `.prettierrc` file:

```js
{
  ...require('eslint-config-vinta/prettier'),
  semi: false,
  bracketSpacing: false,
};
```

You can learn more about Prettier's shareable configs [here](https://github.com/prettier/prettier/blob/master/docs/configuration.md#sharing-configurations).

## Versioning

See the [VERSIONING.md](VERSIONING.md) file.

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