Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xojs/eslint-config-xo-react
ESLint shareable config for React to be used with eslint-config-xo
https://github.com/xojs/eslint-config-xo-react
eslint eslint-config eslint-rules nodejs react xo
Last synced: 25 days ago
JSON representation
ESLint shareable config for React to be used with eslint-config-xo
- Host: GitHub
- URL: https://github.com/xojs/eslint-config-xo-react
- Owner: xojs
- License: mit
- Created: 2015-08-01T22:11:40.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2022-03-19T14:13:41.000Z (over 2 years ago)
- Last Synced: 2024-10-08T19:20:08.071Z (28 days ago)
- Topics: eslint, eslint-config, eslint-rules, nodejs, react, xo
- Language: JavaScript
- Homepage: https://github.com/xojs/xo
- Size: 66.4 KB
- Stars: 116
- Watchers: 9
- Forks: 19
- Open Issues: 6
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# eslint-config-xo-react
> ESLint [shareable config](http://eslint.org/docs/developer-guide/shareable-configs.html) for React to be used with [eslint-config-xo](https://github.com/xojs/eslint-config-xo)
## Install
```sh
npm install --save-dev eslint-config-xo eslint-config-xo-react eslint-plugin-react eslint-plugin-react-hooks
```## Usage
Add some ESLint config to your package.json:
```json
{
"name": "my-awesome-project",
"eslintConfig": {
"extends": [
"xo",
"xo-react"
]
}
}
```Or to .eslintrc:
```json
{
"extends": [
"xo",
"xo-react"
]
}
```Use the `space` sub-config if you want 2 space indentation instead of tabs:
```json
{
"extends": [
"xo",
"xo-react/space"
]
}
```You can also mix it with a [XO](https://github.com/xojs/xo) sub-config:
```json
{
"extends": [
"xo/esnext",
"xo-react"
]
}
```## Tip
### Use with XO
```
$ npm install --save-dev eslint-config-xo-react eslint-plugin-react eslint-plugin-react-hooks
``````json
{
"name": "my-awesome-project",
"xo": {
"extends": "xo-react"
}
}
```## Related
- [eslint-config-xo](https://github.com/xojs/eslint-config-xo) - ESLint shareable config for XO
- [XO](https://github.com/xojs/xo)