eslint-config-xo-next 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/readme.md +12 -12
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -4,9 +4,13 @@ ESLint [shareable config](http://eslint.org/docs/developer-guide/shareable-confi
|
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
- Eliminates
|
|
8
|
-
-
|
|
9
|
-
-
|
|
7
|
+
- Eliminates plugin and parser conflicts between ESLint 10, `eslint-config-next`, and `eslint-config-xo-react`
|
|
8
|
+
- Allows you to combine [Next.js's rules](https://nextjs.org/docs/app/api-reference/config/eslint#rules) with XO's stricter React, accessibility, and hooks rules
|
|
9
|
+
- Allows you to use XO's maintained ESLint plugins instead of Next.js's unmaintained plugins[^1]
|
|
10
|
+
- Acts as a thin compatibility layer instead of depending on and wrapping Next.js or XO packages
|
|
11
|
+
- Your app's `@next/eslint-plugin-next` version can be kept in sync with `next` and other `@next/*` packages using `next upgrade` or `@next/codemod upgrade`
|
|
12
|
+
- You can update `eslint-config-xo` and `eslint-config-xo-react` without waiting for this config to update
|
|
13
|
+
- Supports Tailwind CSS
|
|
10
14
|
|
|
11
15
|
## Install
|
|
12
16
|
|
|
@@ -80,18 +84,14 @@ npm install --save-dev \
|
|
|
80
84
|
|
|
81
85
|
```js
|
|
82
86
|
// xo.config.js
|
|
83
|
-
import
|
|
84
|
-
import
|
|
87
|
+
import eslintConfigXoNext from 'eslint-config-xo-next';
|
|
88
|
+
import eslintConfigXoReact from 'eslint-config-xo-react';
|
|
85
89
|
import {defineConfig} from 'eslint/config';
|
|
86
90
|
|
|
87
91
|
const xoConfig = defineConfig([
|
|
88
|
-
...
|
|
89
|
-
...
|
|
92
|
+
...eslintConfigXoReact(),
|
|
93
|
+
...eslintConfigXoNext(),
|
|
90
94
|
]);
|
|
91
95
|
```
|
|
92
96
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
### How is this different from [eslint-config-xo-nextjs](https://github.com/tusbar/eslint-config-xo-nextjs)?
|
|
96
|
-
|
|
97
|
-
This config acts as a minimal compatibility layer between Next.js's and XO's configs instead of wrapping them. With this config, you install your own version of `@next/eslint-plugin-next` so that its version matches your project's `next` and `@next/*` dependencies, and you install your own versions of `eslint-config-xo` (or `xo`) and `eslint-config-xo-react` so that you can update them without waiting for this plugin to update them.
|
|
97
|
+
[^1]: `eslint-config-next` depends on `eslint-plugin-react` and `eslint-plugin-jsx-a11y`, which are unmaintained and incompatible with ESLint 10. `eslint-config-xo-react` uses `@eslint-react/eslint-plugin` and `eslint-plugin-jsx-a11y-x`.
|