Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zcong1993/neutrino-preset-eslint-react
Neutrino preset for react project adding xo's base JS ESLint config, following the xo styleguide
https://github.com/zcong1993/neutrino-preset-eslint-react
eslint neutrino neutrino-preset react xo
Last synced: about 23 hours ago
JSON representation
Neutrino preset for react project adding xo's base JS ESLint config, following the xo styleguide
- Host: GitHub
- URL: https://github.com/zcong1993/neutrino-preset-eslint-react
- Owner: zcong1993
- License: mit
- Created: 2017-06-30T07:31:45.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-08T02:27:39.000Z (over 6 years ago)
- Last Synced: 2024-11-02T05:04:03.977Z (6 days ago)
- Topics: eslint, neutrino, neutrino-preset, react, xo
- Language: JavaScript
- Homepage:
- Size: 50.8 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# neutrino-preset-eslint-react
[![NPM version](https://img.shields.io/npm/v/neutrino-preset-eslint-react.svg?style=flat)](https://npmjs.com/package/neutrino-preset-eslint-react) [![NPM downloads](https://img.shields.io/npm/dm/neutrino-preset-eslint-react.svg?style=flat)](https://npmjs.com/package/neutrino-preset-eslint-react) [![CircleCI](https://circleci.com/gh/zcong1993/neutrino-preset-eslint-react/tree/master.svg?style=shield)](https://circleci.com/gh/zcong1993/neutrino-preset-eslint-react/tree/master)
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/zcong1993/neutrino-preset-eslint-react)> Neutrino preset for react project adding [xo](https://github.com/sindresorhus/xo)'s base JS ESLint config, following the [xo](https://github.com/sindresorhus/xo) styleguide
## Install
```bash
# yarn
$ yarn add --dev neutrino-preset-eslint-react
# npm
$ npm install --save-dev neutrino-preset-eslint-react
```## Usage
After adding the eslint react preset to your Neutrino-built project, edit your project's package.json to add the preset for
linting **before** your build preset. For example, if you are building your project using `neutrino-preset-react`:```json
{
"scripts": {
"start": "neutrino start --use neutrino-preset-eslint-react neutrino-preset-react",
"build": "neutrino build --use neutrino-preset-eslint-react neutrino-preset-react"
}
}
```
Or if you are using a `.neutrinorc.js`, add this preset to your use array instead of `--use` flags:```js
module.exports = {
use: [
'neutrino-preset-eslint-react',
'neutrino-preset-react'
]
};
```## Middleware options
This preset uses the same middleware options as [neutrino-middleware-eslint](https://neutrino.js.org/middleware/neutrino-middleware-eslint).
If you wish to customize what is included, excluded, or any ESLint options, you can provide an options object with the
middleware and this will be merged with our internal defaults for this preset. Use an array pair instead of a string
to supply these options.```js
module.exports = {
use: [
['neutrino-preset-eslint-react', {
eslint: {
rules: {
semi: ['error', 'always']
}
}
}]
]
}
```## Contributing
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D## Author
**neutrino-preset-eslint-react** © [zcong1993](https://github.com/zcong1993), Released under the [MIT](./LICENSE) License.
Authored and maintained by zcong1993 with help from contributors ([list](https://github.com/zcong1993/neutrino-preset-eslint-react/contributors)).> [github.com/zcong1993](https://github.com/zcong1993) · GitHub [@zcong1993](https://github.com/zcong1993)