Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fortechromania/eslint-config-fortech-react
ESLint config for modern JavaScript syntax and React
https://github.com/fortechromania/eslint-config-fortech-react
es2015 eslint eslint-config javascript react styleguide
Last synced: 11 days ago
JSON representation
ESLint config for modern JavaScript syntax and React
- Host: GitHub
- URL: https://github.com/fortechromania/eslint-config-fortech-react
- Owner: FortechRomania
- License: gpl-3.0
- Created: 2017-10-08T18:02:57.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-18T15:01:09.000Z (over 7 years ago)
- Last Synced: 2024-12-27T19:06:23.686Z (about 1 month ago)
- Topics: es2015, eslint, eslint-config, javascript, react, styleguide
- Language: JavaScript
- Homepage:
- Size: 31.3 KB
- Stars: 1
- Watchers: 17
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eslint-config-fortech-react
ESLint config for modern JavaScript syntax and React.This is intended to be used in a React codebase. For a base config that can be used for node or non-React projects, try [eslint-config-fortech](https://github.com/FortechRomania/eslint-config-fortech).
## Usage
Install eslint and the babel-eslint parser:
```bash
npm i eslint babel-eslint -D
```Install the package:
```bash
npm i eslint-config-fortech-react -D
```Install peer dependencies:
```bash
npm i eslint-plugin-import eslint-plugin-react eslint-plugin-jsx-a11y -D
```Create an `.eslintrc` file in your project root folder with the following content.
```javascript
{
"env": {
"browser": true, // set this if you're running a browser app
"mocha": true // set this if you have mocha-style tests in your app folder
},
"extends": "fortech-react"
}
```For more details about the `env` object, check out the [list of possible values](https://eslint.org/docs/user-guide/configuring#specifying-environments).
Additionally you can define your custom overwrites in `rules`:
```javascript
{
"env": {
"browser": true,
"mocha": true
},
"extends": "fortech-react"
"rules": {
"quotes": [ 2, "single" ],
}
}
```## Reasoning
The `airbnb` styleguide is really great, but, we at Fortech, felt like it needed a few changes so we published this package which takes the core rules from the `airbnb` config and overwrites some of them based on our needs.You can read more about some of the decisions [HERE](https://medium.freecodecamp.com/adding-some-air-to-the-airbnb-style-guide-3df40e31c57a#.jz912uw00).