Skip to content

Commit

Permalink
Require Node.js 18
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jan 21, 2025
1 parent 1cf2106 commit 4765c29
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 30 deletions.
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {default} from './index.js';
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@
"url": "https://sindresorhus.com"
},
"type": "module",
"engines": {
"node": ">=12"
},
"scripts": {
"test": "ava"
},
"exports": {
".": "./index.js",
"./space": "./space.js"
},
"sideEffects": false,
"engines": {
"node": ">=18.18"
},
"scripts": {
"test": "eslint && ava"
},
"files": [
"index.js",
"space.js"
Expand Down Expand Up @@ -55,16 +56,16 @@
"hint",
"simple"
],
"dependencies": {
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^5.1.0"
},
"devDependencies": {
"ava": "^6.2.0",
"eslint": "^9.18.0",
"eslint-plugin-react": "^7.29.0",
"eslint-plugin-react-hooks": "^5.1.0",
"react": "^17.0.2"
"react": "^19.0.0"
},
"peerDependencies": {
"eslint": ">=9.18.0",
"eslint-plugin-react": ">=7.29.0",
"eslint-plugin-react-hooks": ">=5.1.0"
"eslint": ">=9.18.0"
}
}
27 changes: 9 additions & 18 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,26 @@
## Install

```sh
npm install --save-dev eslint-config-xo eslint-config-xo-react eslint-plugin-react eslint-plugin-react-hooks
npm install --save-dev eslint-config-xo eslint-config-xo-react
```

## Usage

Add some ESLint config to your `eslint.config.js`:

```js
// eslint.config.js
import xo from 'eslint-config-xo';
import xoReact from 'eslint-config-xo-react';

export default [...xo, ...xoReact];
export default [
...xo,
...xoReact
];
```

Use the `space` sub-config if you want 2 space indentation instead of tabs:

```js
// eslint.config.js
import xo from 'eslint-config-xo';
import xoReactSpace from 'eslint-config-xo-react/space';

export default [...xo, ...xoReactSpace];
```

You can also mix it with a [eslint-config-xo](https://github.com/xojs/eslint-config-xo) sub-config:

```js
// eslint.config.js
import xoSpace from 'eslint-config-xo/space';
import xoReactSpace from 'eslint-config-xo-react/space';

Expand All @@ -43,12 +34,12 @@ export default [
];
```

## Tip
<!-- ## Tip
### Use with XO
```
$ npm install --save-dev eslint-config-xo-react eslint-plugin-react eslint-plugin-react-hooks
```sh
npm install --save-dev eslint-config-xo-react eslint-plugin-react eslint-plugin-react-hooks
```
```json
Expand All @@ -58,7 +49,7 @@ $ npm install --save-dev eslint-config-xo-react eslint-plugin-react eslint-plugi
"extends": "xo-react"
}
}
```
``` -->

## Related

Expand Down

0 comments on commit 4765c29

Please sign in to comment.