Skip to content

Commit eac3926

Browse files
committed
docs: update
1 parent ca2f719 commit eac3926

File tree

12 files changed

+85
-236
lines changed

12 files changed

+85
-236
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
</a>
99
</p>
1010

11-
Collection of [ESLint](https://eslint.org)-related packages for Nuxt ✨
11+
Collection of ESLint-related packages for Nuxt,
12+
provides project-aware, easy-to-use, extensible and future-proof integrations.
13+
14+
Refer to the [documentation](https://eslint.nuxt.com) for more details.
1215

1316
## Packages
1417

docs/content/1.packages/0.module.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
title: ESLint Module
33
---
44

5-
This module that generates project-aware [ESLint flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new) for Nuxt.
5+
All-in-one ESLint integrations for Nuxt. It generates project-aware [ESLint flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new) and provides the ability to optionally runs ESLint check along the dev server.
66

7-
:::callout{icon="i-heroicons-light-bulb"}
7+
:::callout{icon="i-ph-lightbulb-duotone"}
88
This module is designed for the [new ESLint flat config format](https://eslint.org/docs/latest/use/configure/configuration-files-new), which will be as default in ESLint v9.
99
The legacy `.eslintrc` config is **not supported**. We highly recommand you to migrate over the flat config to be future-proof. If you still want to use the legacy format, you might need to manually config with [`@nuxt/eslint-config`](/packages/configs), which will also lost some features like project-aware settings.
1010
:::

docs/content/1.packages/1.config.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
title: '@nuxt/eslint-config'
33
---
44

5-
A shared ESLint config for Nuxt 3 projects.
5+
Shared ESLint config for Nuxt 3 projects. Unopinionated by default, but customizable.
66

7-
:::callout{icon="i-heroicons-light-bulb"}
7+
:::callout{icon="i-ph-lightbulb-duotone"}
88
We recommand to use directly the [ESLint Module](/packages/module) that will provide project-aware ESLint config and Nuxt DevTools integration on top of this config.
99
:::
1010

@@ -13,10 +13,12 @@ We recommand to use directly the [ESLint Module](/packages/module) that will pro
1313
This package provides two different ESLint configs:
1414

1515
- [Flat Config](#flat-config-format) - Customizable, future-proof, config for the [new flat config format](https://eslint.org/docs/latest/use/configure/configuration-files-new).
16-
- [Legacy Config](#legacy-config-format) - Opinionated, Static, config for the legacy `.eslintrc` format.
16+
- [Legacy Config](#legacy-config-format) - Unopinionated, Static, config for the legacy `.eslintrc` format.
1717

1818
## Flat Config Format
1919

20+
The flat config format is the future of ESLint and is designed to be more flexible and project-aware. The entry `@nuxt/eslint-plugin/flat` provides a factory function to create a project-aware ESLint config for Nuxt 3 projects. Unopinionated by default, but customizable by passing options to the factory function. Used by [`@nuxt/eslint`](/packages/module) module to generate project-aware ESLint config.
21+
2022
1. Install this package and `eslint` in your `devDependencies`.
2123

2224
```bash
@@ -49,6 +51,8 @@ You might also want to add a script entry to your `package.json:
4951

5052
## Legacy Config Format
5153

54+
The legacy config configures for TypeScript and Vue integrations for ESLint. It is unopinionated and static, that does not contains stylistic rules nor project-aware settings.
55+
5256
1. Install this package and `eslint` in your `devDependencies`.
5357

5458
```bash

docs/content/1.packages/2.plugin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: '@nuxt/eslint-plugin'
44

55
ESLint plugin of additional rules for Nuxt 3.
66

7-
:::callout{icon="i-heroicons-light-bulb"}
7+
:::callout{icon="i-ph-lightbulb-duotone"}
88
Usually, you don't need to use this package directly. It's already included in the [ESLint Module](/packages/module) and the [ESLint Config](/packages/config).
99
:::
1010

docs/content/2.guide/0.faq.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Here's a table to help you understand the differences:
2626
| [`@nuxt/eslint`](/packages/module) <br> All-in-one ESLint module for Nuxt 3 | [`nuxt3`]{.badge-nuxt3} [`flat-config`]{.badge-flat} [`recommended`]{.badge-recommend} |
2727
| [`@nuxt/eslint-config`](/packages/config) <br> Shared config for Nuxt 3, for both flat config and legacy config. <br>Unopinionated but customizable. | [`nuxt3`]{.badge-nuxt3} [`flat-config`]{.badge-flat} [`legacy-config`]{.badge-legacy} |
2828
| [`@nuxt/eslint-plugin`](/packages/plugin) <br> Low-level ESLint plugin for Nuxt 3. | [`nuxt3`]{.badge-nuxt3} |
29-
| [`@nuxtjs/eslint-module`](/packages/module) <br> Runs ESLint check along the dev server. <br> Now merged into `@nuxt/eslint` module. | [`nuxt3`]{.badge-nuxt3} [`nuxt2`]{.badge-nuxt2} [`deprecated`]{.badge-legacy} |
30-
| [`@nuxtjs/eslint-config`](/packages/config) <span class="opacity-50">(note the `@nuxtjs` scope)</span> <br> Shared config for Nuxt 2, opinionated with stylistic rules.<br> Maintainance mode, no long have active developments. | [`nuxt2`]{.badge-nuxt2} [`legacy-config`]{.badge-legacy} |
31-
| [`@nuxtjs/eslint-plugin-typescript`](/packages/plugin) <span class="opacity-50">(note the `@nuxtjs` scope)</span> <br> TypeScript integrations for `@nuxtjs/eslint-config`.<br> Maintainance mode, no long have active developments. | [`nuxt2`]{.badge-nuxt2} [`legacy-config`]{.badge-legacy} |
29+
| [`@nuxtjs/eslint-module`](/legacy/eslint-module) <br> Runs ESLint check along the dev server. <br> Now merged into `@nuxt/eslint` module. | [`nuxt3`]{.badge-nuxt3} [`nuxt2`]{.badge-nuxt2} [`deprecated`]{.badge-legacy} |
30+
| [`@nuxtjs/eslint-config`](/legacy/eslint-config) <span class="opacity-50">(note the `@nuxtjs` scope)</span> <br> Shared config for Nuxt 2, opinionated with stylistic rules.<br> Maintainance mode, no long have active developments. | [`nuxt2`]{.badge-nuxt2} [`legacy-config`]{.badge-legacy} |
31+
| [`@nuxtjs/eslint-plugin-typescript`](/legacy/eslint-config) <span class="opacity-50">(note the `@nuxtjs` scope)</span> <br> TypeScript integrations for `@nuxtjs/eslint-config`.<br> Maintainance mode, no long have active developments. | [`nuxt2`]{.badge-nuxt2} [`legacy-config`]{.badge-legacy} |
3232

3333
</div>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,56 @@
11
---
22
title: '@nuxtjs/eslint-config'
33
---
4+
5+
Opinionated [ESlint](https://eslint.org/) configuration used internally for Nuxt 2 projects.
6+
7+
:::callout{icon="i-ph-lightbulb-duotone"}
8+
This package is for Nuxt 2. For Nuxt 3 projects, use [`@nuxt/eslint`](/packages/module) instead.<br>
9+
:::
10+
11+
:::callout{icon="i-ph-warning-circle-duotone" color="amber"}
12+
This package is in maintainance mode and no longer have active developments.
13+
:::
14+
15+
### Usage
16+
17+
1. Add this package to your `devDependencies`
18+
19+
```bash
20+
$ npm i -D @nuxtjs/eslint-config
21+
# or
22+
$ yarn add -D @nuxtjs/eslint-config
23+
```
24+
25+
2. Install `eslint` if not already present locally or globally
26+
27+
```bash
28+
$ npm i -D eslint
29+
# or
30+
$ yarn add -D eslint
31+
```
32+
33+
3. Create a `.eslintrc` file
34+
35+
4. Extend our config (you can use just the scope name as ESLint will assume the `eslint-config` prefix):
36+
37+
```json
38+
{
39+
"extends": ["@nuxtjs/eslint-config"]
40+
}
41+
```
42+
43+
### TypeScript
44+
45+
If you're using TypeScript, follow [Usage](#usage) section by replacing `@nuxtjs/eslint-config` by `@nuxtjs/eslint-config-typescript`.
46+
47+
And in your `.eslintrc` all you need is :
48+
49+
```json
50+
{
51+
"extends": ["@nuxtjs/eslint-config-typescript"]
52+
}
53+
```
54+
55+
You can then edit/override same rules as you could with `@nuxtjs/eslint-config` but also TypeScript rules.
56+
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).
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: '@nuxtjs/eslint-module'
3+
---
4+
5+
Runs ESLint check along the dev server. Now merged into the [`@nuxt/eslint`](/packages/eslint) module.

packages-legacy/nuxt2-eslint-config-typescript/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
[![npm](https://flat.badgen.net/npm/dm/@nuxtjs/eslint-config)](https://npmjs.com/package/@nuxtjs/eslint-config)
55
[![npm (scoped with tag)](https://flat.badgen.net/npm/v/@nuxtjs/eslint-config)](https://npmjs.com/package/@nuxtjs/eslint-config)
66

7-
> Opinionated [ESlint](https://eslint.org/) configuration used internally by Nuxt projects.
7+
Opinionated [ESlint](https://eslint.org/) configuration for Nuxt 2.
88

9-
### Usage
10-
11-
Check docs in [`@nuxtjs/eslint-config`](../eslint-config-legacy/)
9+
Refer to the [documentation](https://eslint.nuxt.com/legacy/eslint-config) for more details.

packages-legacy/nuxt2-eslint-config/README.md

Lines changed: 2 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -4,66 +4,6 @@
44
[![npm](https://flat.badgen.net/npm/dm/@nuxtjs/eslint-config)](https://npmjs.com/package/@nuxtjs/eslint-config)
55
[![npm (scoped with tag)](https://flat.badgen.net/npm/v/@nuxtjs/eslint-config)](https://npmjs.com/package/@nuxtjs/eslint-config)
66

7-
> Opinionated [ESlint](https://eslint.org/) configuration used internally by Nuxt projects.
7+
Opinionated [ESlint](https://eslint.org/) configuration for Nuxt 2.
88

9-
### Usage
10-
11-
Do you want to add the config to your own projects? There you go:
12-
13-
1. Add this package to your devDependencies
14-
15-
```bash
16-
$ npm i -D @nuxtjs/eslint-config
17-
# or
18-
$ yarn add -D @nuxtjs/eslint-config
19-
```
20-
21-
2. Install `eslint` if not already present locally or globally
22-
23-
```bash
24-
$ npm i -D eslint
25-
# or
26-
$ yarn add -D eslint
27-
```
28-
29-
3. Create a `.eslintrc` file
30-
31-
4. Extend our config (you can use just the scope name as ESLint will assume the `eslint-config` prefix):
32-
33-
```json
34-
{
35-
"extends": ["@nuxtjs/eslint-config"]
36-
}
37-
```
38-
39-
### Full example
40-
41-
A full example `.eslintrc` for a project with babel support:
42-
43-
> Dont forget to `npm i -D @babel/eslint-parser` or `yarn add -D @babel/eslint-parser`
44-
45-
```json
46-
{
47-
"root": true,
48-
"parser": "@babel/eslint-parser",
49-
"parserOptions": {
50-
"sourceType": "module"
51-
},
52-
"extends": ["@nuxt/eslint-config"],
53-
}
54-
```
55-
56-
### TypeScript
57-
58-
If you're using TypeScript, follow [Usage](#usage) section by replacing `@nuxtjs/eslint-config` by `@nuxtjs/eslint-config-typescript`.
59-
60-
And in your `.eslintrc` all you need is :
61-
62-
```json
63-
{
64-
"extends": ["@nuxtjs/eslint-config-typescript"]
65-
}
66-
```
67-
68-
You can then edit/override same rules as you could with `@nuxtjs/eslint-config` but also TypeScript rules.
69-
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).
9+
Refer to the [documentation](https://eslint.nuxt.com/legacy/eslint-config) for more details.

packages/eslint-config/README.md

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,9 @@
33
[![npm version][npm-version-src]][npm-version-href]
44
[![npm downloads][npm-downloads-src]][npm-downloads-href]
55

6-
> Non-opinionated [ESlint](https://eslint.org/) configuration for Nuxt 3 apps.
6+
Shared ESLint config for Nuxt 3 projects. Unopinionated by default, but customizable.
77

8-
### Features
9-
10-
- Works out-of-the-box with no additional configuration.
11-
- Nuxt-specific rules for pages, components and more.
12-
13-
### Installation
14-
15-
1. Install this package and `eslint` in your `devDependencies`.
16-
17-
```bash
18-
npm i -D @nuxt/eslint-config eslint
19-
yarn add -D @nuxt/eslint-config eslint
20-
pnpm add -D @nuxt/eslint-config eslint
21-
```
22-
23-
2. Extend the default Nuxt config by creating an `.eslintrc.cjs`:
24-
25-
```js
26-
module.exports = {
27-
root: true,
28-
extends: ["@nuxt/eslint-config"],
29-
};
30-
```
31-
32-
You might also want to add a script entry to your `package.json:
33-
34-
```json
35-
{
36-
"scripts": {
37-
"lint": "eslint ."
38-
}
39-
}
40-
```
8+
Refer to the [documentation](https://eslint.nuxt.com/packages/config) for more details.
419

4210
<!-- Badges -->
4311

0 commit comments

Comments
 (0)