---
title: '@nuxtjs/eslint-config'
navigation: false
head:
  meta:
    - name: robots
      content: noindex
---

Opinionated [ESlint](https://eslint.org/) configuration used internally for Nuxt 2 projects.

:::callout{icon="i-ph-lightbulb-duotone"}
This package is for Nuxt 2. For Nuxt 3 projects, use [`@nuxt/eslint`](/packages/module) instead.<br>
:::

:::callout{icon="i-ph-warning-circle-duotone" color="amber"}
This package is in maintainance mode and no longer have active developments.
:::

::read-more
---
to: https://github.com/nuxt/eslint/tree/main/packages-legacy/nuxt2-eslint-config
color: gray
icon: i-simple-icons-github
---
Source code on GitHub
::

### Usage

1. Add this package to your `devDependencies`

```bash
$ npm i -D @nuxtjs/eslint-config
# or
$ yarn add -D @nuxtjs/eslint-config
```

2. Install `eslint` if not already present locally or globally

```bash
$ npm i -D eslint
# or
$ yarn add -D eslint
```

3. Create a `.eslintrc` file

4. Extend our config (you can use just the scope name as ESLint will assume the `eslint-config` prefix):

```json
{
  "extends": ["@nuxtjs/eslint-config"]
}
```

### TypeScript

If you're using TypeScript, follow [Usage](#usage) section by replacing `@nuxtjs/eslint-config` by `@nuxtjs/eslint-config-typescript`.

And in your `.eslintrc` all you need is :

```json
{
  "extends": ["@nuxtjs/eslint-config-typescript"]
}
```

You can then edit/override same rules as you could with `@nuxtjs/eslint-config` but also TypeScript rules.
You can find the list of supported TypeScript rules [here](https://typescript-eslint.io/rules/#supported-rules) and you can read more about Nuxt's TypeScript support [in the docs](https://nuxt.com/docs/guide/concepts/typescript).
