Created
March 7, 2019 02:08
-
-
Save agrublev/b0e76edc305a81df05b2b6d6fbaee690 to your computer and use it in GitHub Desktop.
eslint
This file contains hidden or 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
module.exports = { | |
plugins: ["react","markdown"], | |
globals: { | |
importScripts: true | |
}, | |
env: { | |
browser: true, | |
node: true, | |
es6: true | |
}, | |
parserOptions: { | |
ecmaVersion: 6, | |
sourceType: "module", | |
ecmaFeatures: { | |
jsx: true, | |
experimentalObjectRestSpread: true | |
} | |
}, | |
rules: { | |
"no-console": ["off"], | |
"react/jsx-indent": ["off"], | |
"react/destructuring-assignment": ["off"], | |
"import/no-named-as-default-member": ["off"], | |
"import/named": ["off"], | |
"import/order": ["off"], | |
"import/no-extraneous-dependencies": ["off"], | |
"import/no-named-as-default": ["off"], | |
"react/jsx-indent-props": ["off"], | |
"flowtype/require-return-type": ["off"], | |
camelcase: [ | |
1, | |
{ | |
properties: "always" | |
} | |
], | |
"react/jsx-one-expression-per-line": [ | |
"warn", | |
{ | |
allow: "none" | |
} | |
], | |
"react/prop-types": "off", | |
complexity: ["warn", 5], | |
"max-nested-callbacks": ["warn", 8], | |
"no-unused-vars": "warn", | |
"max-statements": [ | |
"warn", | |
{ | |
max: 4 | |
} | |
], | |
"max-statements-per-line": [ | |
"warn", | |
{ | |
max: 1 | |
} | |
], | |
"getter-return": "warn", | |
"jsx-quotes": ["warn", "prefer-double"] | |
}, | |
extends: ["prettier", "react-app", "eslint:recommended", "plugin:react/recommended"], | |
settings: { | |
react: { | |
createClass: "createReactClass", | |
pragma: "React", // Pragma to use, default to "React" | |
version: "detect", // React version. "detect" automatically picks the version you have installed. | |
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value. | |
flowVersion: "0.53" // Flow version | |
}, | |
propWrapperFunctions: [ | |
// The names of any function used to wrap propTypes, e.g. `forbidExtraProps`. If this isn't set, any propTypes wrapped in a function will be skipped. | |
"forbidExtraProps", | |
{ property: "freeze", object: "Object" }, | |
{ property: "myFavoriteWrapper" } | |
] | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment