Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mrgreentech/eslint-config-gfp

GFP eslint config
https://github.com/mrgreentech/eslint-config-gfp

eslint eslint-config

Last synced: about 1 month ago
JSON representation

GFP eslint config

Awesome Lists containing this project

README

        

This is the config used for all products based on the Green Frontend platform.

# How to use
1. Install package:
```
npm install --save-dev eslint eslint-config-gfp
```

2. Add lint script in package.json
```
"scripts": {
"lint": "eslint *.js"
},
```
3. Create `.eslintrc.json` in the root of the project.
To use our **browser rules** (comes with angular environment, made for ES5):
```
{
"extends": "gfp"
}
```

To use our **node JS rules** (made for ES6 progressively), use:
```
{
"extends": "gfp/node"
}
```

To use our **React JS rules** (including JSX support), use:
```
{
"extends": "gfp/react"
}
```

To use our **React Native JS rules** (including JSX support), use:
```
{
"extends": "gfp/react-native"
}
```

To use our **Jest JS rules**, use:
```
{
"extends": "gfp/jest"
}
```

If you are using **Prettier** with any of our eslint configurations, add:
```
{
"extends": "gfp/prettier"
}
```

# Contributing

We use semantic versioning. That means that if you introduce a change that will break current API (the eslint rules fails) it is a MAJOR change.
If you introduce a change that only `"warn"` about a new rule it is considered a MINOR change.