Skip to content

Instantly share code, notes, and snippets.

@a-m-dev
Created February 3, 2020 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a-m-dev/3dbb42ec451a899520af503b0f9443f1 to your computer and use it in GitHub Desktop.
Save a-m-dev/3dbb42ec451a899520af503b0f9443f1 to your computer and use it in GitHub Desktop.
{
"extends": [
"eslint:recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:react/recommended"
],
"plugins": [
"react"
],
"parserOptions": {
"ecmaVersion": 11,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"parser": "babel-eslint",
"env": {
"es6": true,
"browser": true,
"node": true
},
"rules": {
"no-var": 0,
"quotes": 0,
"no-console": 0,
"no-debugger": 0,
"semi": [2, "never"],
"no-trailing-spaces": [2, { "skipBlankLines": true, "ignoreComments": true }],
"eol-last": 1,
"no-unused-vars": [2, {
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": false
}],
"no-underscore-dangle": [2, { "allowAfterThis": false }],
"no-alert": 2,
"no-lone-blocks": 2,
"jsx-quotes": [2, "prefer-single"],
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"react/display-name": [ 1, {"ignoreTranspilerName": false }],
"react/forbid-prop-types": [1, {"forbid": ["any"]}],
"react/jsx-boolean-value": 1,
"jsx-closing-bracket-location": 0,
"react/jsx-curly-spacing": [2, {"when": "never", "allowMultiline": false}],
"react/jsx-indent-props": [2, 2],
"react/jsx-key": [2, { "checkFragmentShorthand": true }],
"react/jsx-max-props-per-line": [2, { "maximum": 2, "when": "multiline" }],
"react/jsx-no-bind": 1,
"react/jsx-no-duplicate-props": [2, { "ignoreCase": true }],
"react/jsx-no-literals": 0,
"react/jsx-no-undef": [2, { "allowGlobals": true }],
"react/jsx-pascal-case": 2,
"react/sort-prop-types": [2, {
"callbacksLast": true,
"ignoreCase": false,
"requiredFirst": true,
"sortShapeProp": true,
"noSortAlphabetically": false
}],
"react/jsx-sort-props": [2, {
"callbacksLast": true,
"shorthandFirst": true,
"shorthandLast": false,
"ignoreCase": false,
"noSortAlphabetically": false
}],
"react/no-danger": 0,
"react/no-did-mount-set-state": 1,
"react/no-did-update-set-state": 1,
"react/no-direct-mutation-state": 2,
"react/no-multi-comp": 2,
"react/no-set-state": 0,
"react/no-unknown-property": 2,
"react/prefer-es6-class": 2,
"react/prop-types": 0, // this parameter will change to 2, we need to use flow as type checker in our project
"react/react-in-jsx-scope": 2,
"react/self-closing-comp": [2, { "component": true, "html": false }],
"react/sort-comp": 1,
"import/no-unresolved": [0, { "commonjs": true }]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment