.eslintrc
{
"extends": [
"airbnb",
"plugin:flowtype/recommended",
"plugin:prettier/recommended",
"prettier/flowtype",
"prettier/react",
"prettier/standard"
],
"parser": "babel-eslint",
"env": {
"browser": true,
"jest": true
},
"globals": {
"cy": false
},
"plugins": [
"babel",
"flowtype",
"prettier"
],
"settings": {
"flowtype": {
"onlyFilesWithFlowAnnotation": true
}
},
"rules": {
"arrow-body-style": ["warn", "as-needed"],
"arrow-parens": "off",
"block-spacing": "warn",
"camelcase": "off",
"class-methods-use-this": "off",
"comma-dangle": [
"warn", {
"arrays": "always-multiline",
"imports": "always-multiline",
"objects": "always-multiline",
"functions": "only-multiline"
}
],
"dot-notation": "warn",
"function-paren-newline": "off",
"generator-star-spacing": "off",
"global-require": "off",
"max-len": "off",
"newline-per-chained-call": ["warn", { "ignoreChainWithDepth": 5 }],
"no-case-declarations": "warn",
"no-mixed-spaces-and-tabs": ["warn", "smart-tabs"],
"no-multi-spaces": [
"warn", {
"exceptions": {
"VariableDeclarator": true,
"Property": false
}
}
],
"no-nested-ternary": "warn",
"no-new": "off",
"no-param-reassign": ["warn", { "props": false }],
"no-plusplus": "off",
"no-restricted-globals": ["error", "fdescribe", "fit"],
"no-restricted-syntax": [
"error",
"DebuggerStatement",
"LabeledStatement",
"WithStatement"
],
"no-return-assign": ["error", "except-parens"],
"no-template-curly-in-string": "warn",
"no-trailing-spaces": "warn",
"no-underscore-dangle": "off",
"no-unused-expressions": ["error", { "allowTaggedTemplates": true }],
"no-unused-vars": "warn",
"object-curly-newline": "off",
"object-shorthand": ["warn", "always"],
"one-var": "warn",
"padded-blocks": "warn",
"prefer-const": "warn",
"prefer-destructuring": "warn",
"prefer-template": "warn",
"prefer-promise-reject-errors": "off",
"quotes": ["warn", "single", "avoid-escape"],
"require-jsdoc": [
0, {
"require": {
"FunctionDeclaration": true,
"MethodDefinition": false,
"ClassDeclaration": false
}
}
],
"space-before-function-paren": [
"warn", {
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}
],
"space-in-parens": "warn",
"spaced-comment": [
"warn",
"always", {
"exceptions": [
"-+"
],
"markers": [
"eslint-disable",
"eslint-disable-line",
"eslint-disable-next-line",
"eslint-enable"
]
}
],
"valid-jsdoc": "off",
"flowtype/require-parameter-type": ["warn", { "excludeArrowFunctions": "expressionsOnly" }],
"flowtype/require-return-type": ["warn", "always", { "excludeArrowFunctions": "expressionsOnly" }],
"flowtype/space-after-type-colon": ["error", "always"],
"import/export": "off",
"import/no-dynamic-require": "off",
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
"import/no-named-as-default": "off",
"import/no-unresolved": "warn",
"import/no-webpack-loader-syntax": "off",
"import/prefer-default-export": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/label-has-for": "off",
"jsx-a11y/no-static-element-interactions": "off",
"jsx-quotes": "warn",
"react/destructuring-assignment": "warn",
"react/forbid-foreign-prop-types": "off",
"react/jsx-closing-bracket-location": ["warn", "line-aligned"],
"react/jsx-filename-extension": "off",
"react/jsx-first-prop-new-line": ["warn", "multiline"],
"react/jsx-indent": ["warn", 2],
"react/jsx-indent-props": ["warn", 2],
"react/jsx-key": "warn",
"react/jsx-max-props-per-line": ["warn", { "maximum": 4 }],
"react/jsx-no-target-blank": "off",
"react/no-array-index-key": "off",
"react/no-danger": "off",
"react/no-did-mount-set-state": "warn",
"react/no-did-update-set-state": "warn",
"react/jsx-boolean-value": "off",
"react/jsx-no-duplicate-props": "warn",
"react/jsx-one-expression-per-line": "off",
"react/jsx-pascal-case": "warn",
"react/no-direct-mutation-state": "warn",
"react/no-unused-prop-types": "warn",
"react/no-unused-state": "warn",
"react/no-unescaped-entities": "off",
"react/prefer-stateless-function": "off",
"react/prop-types": "error",
"react/require-default-props": "off",
"react/sort-prop-types": "warn",
"react/sort-comp": [
"warn",
{
"order": [
"constructor",
"lifecycle",
"everything-else",
"render"
],
"groups": {
"lifecycle": [
"state",
"statics",
"contextTypes",
"childContextTypes",
"getChildContext",
"propTypes",
"defaultProps",
"shouldComponentUpdate",
"componentWillMount",
"componentDidMount",
"componentWillReceiveProps",
"componentWillUpdate",
"componentDidUpdate",
"componentWillUnmount"
]
}
}
]
}
}