https://github.com/fiverr/eslint-config-fiverr
ESLint configuration & ruleset for Javascript (ES6) + React
https://github.com/fiverr/eslint-config-fiverr
Last synced: about 1 month ago
JSON representation
ESLint configuration & ruleset for Javascript (ES6) + React
- Host: GitHub
- URL: https://github.com/fiverr/eslint-config-fiverr
- Owner: fiverr
- Created: 2016-11-06T09:47:37.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-07-16T15:09:52.000Z (11 months ago)
- Last Synced: 2025-04-04T18:12:02.732Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 45.9 KB
- Stars: 3
- Watchers: 83
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# eslint-config-fiverr
ESLint configuration & ruleset for Javascript (ES6) + React.
## Installation
In order to add eslint-config-fiverr to a repository, use npm to add it to the development dependencies.
```
npm i -D @fiverr/eslint-config-fiverr eslint-plugin-react
```## Configuration
Add a `.eslintrc` file in the main directory of your repository, in which you define the usage of eslint-config-fiverr as well as repository specific configuration & rules.
This is the basic structure:
```javascript
{
"extends": "@fiverr/fiverr",
"globals": {},
"rules": {}
}
```Include some:
```js
{
"extends": [
"@fiverr/eslint-config-fiverr/rules/base",
"@fiverr/eslint-config-fiverr/rules/es6",
"@fiverr/eslint-config-fiverr/rules/jest",
]
}
```Included in `@fiverr/fiverr`:
- `base`: Just the set of rules
- `es6`: New ES support and rules
- `react`: React specific rules and `eslint-plugin-react` pluginNeed to be added explicitly:
- `jest`
- `mocha`* globals - add any global variable that is used in your repository. Example: `"React": true`
* rules - add any rule you need in addition to eslint-config-fiverr, or if you want to override some of it's rules.## IDE integration
Configuring your IDE to use ESLint is fairly easy:
##### RubyMine
1. Open settings by clicking `cmd` + `,`
2. Languages & Frameworks > Javascript > Code Quality Tools > ESLint
3. Check the 'Enable' checkbox
4. Under 'Node Interpeter' type the path to the NodeJS executable file (rubymine usually auto-detects it)
5. Under 'Configuration File' check the option 'Search for .eslitrc'.
6. Click OK##### Sublime
You can use either of these plugins:1. [SublimeLinter-eslint](https://github.com/roadhump/SublimeLinter-eslint)
2. [Build Next](https://github.com/albertosantini/sublimetext-buildnext)
##### Atom
[linter-eslint](https://atom.io/packages/linter-eslint)