Created
February 12, 2017 01:27
-
-
Save marcelmokos/e2d6386872648d50f9581e54318305de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
root: true | |
parser: babel-eslint | |
extends: | |
# http://eslint.org/docs/user-guide/configuring#using-eslintrecommended | |
- eslint:recommended | |
# https://github.com/gajus/eslint-plugin-flowtype | |
- plugin:flowtype/recommended | |
# https://www.npmjs.com/package/eslint-config-airbnb-base | |
- airbnb | |
plugins: | |
- react | |
- import | |
- async-await | |
- jest | |
- flowtype | |
settings: | |
flowtype: | |
onlyFilesWithFlowAnnotation: false | |
env: | |
es6: true | |
browser: true | |
node: true | |
jasmine: true | |
jest: true | |
parserOptions: | |
ecmaVersion: 2017 | |
sourceType: module | |
rules: | |
### Different from airbnb config | |
### Styling ### | |
# better to ignore comments and others | |
max-len: | |
- error | |
- | |
code: 100 | |
ignoreComments: true | |
ignoreTrailingComments: true | |
ignoreStrings: true | |
ignoreTemplateLiterals: true | |
ignoreRegExpLiterals: true | |
# I prefer new line before error | |
# http://eslint.org/docs/rules/newline-before-return | |
newline-before-return: error # airbnb default: off | |
# I prefer double quotes | |
# http://eslint.org/docs/rules/quotes | |
quotes: [error, double] # airbnb default: ['error', 'single', { avoidEscape: true }] | |
# enforce no padding inside curly braces | |
#http://eslint.org/docs/rules/object-curly-spacing | |
object-curly-spacing: [error, never] | |
### Variables ### | |
# Functions and classes can be used before declaration | |
# http://eslint.org/docs/rules/no-use-before-define | |
no-use-before-define: # airbnb default: error | |
- error | |
- | |
functions: false | |
classes: false | |
### ES6 ### | |
# enforce usage of spacing in template strings | |
# http://eslint.org/docs/rules/template-curly-spacing | |
template-curly-spacing: [error, never] # airbnb default: error | |
### Best practices ### | |
# require or disallow Yoda conditions | |
yoda: [error, never, { exceptRange: true }] | |
# I prefer culry braces all the time | |
curly: [error, all] # airbnb default: [error, multi-line] | |
### Import ### | |
import/prefer-default-export: 0 | |
import/first: 0 | |
### Errors ### | |
no-console: 0 | |
no-debugger: 0 | |
### Async await ### | |
async-await/space-after-async: error | |
async-await/space-after-await: error | |
### React ### | |
# it is better to use jsx in js | |
react/jsx-filename-extension: 0 | |
### Specific for this experiment project | |
# render can do not have use static | |
class-methods-use-this: | |
- error | |
- | |
exceptMethods: | |
- render |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment