Skip to content

Instantly share code, notes, and snippets.

@Nantris
Created October 30, 2019 20:08
Show Gist options
  • Save Nantris/8c5dd361d7447a70af51723bbe051f13 to your computer and use it in GitHub Desktop.
Save Nantris/8c5dd361d7447a70af51723bbe051f13 to your computer and use it in GitHub Desktop.
.eslintrc
{
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module",
"allowImportExportEverywhere": true,
"ecmaFeatures": {
"jsx": true
}
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"airbnb",
"prettier",
"prettier/react",
"prettier/flowtype",
],
"env": {
"browser": true,
},
"rules": {
"emotion/jsx-import": "error",
"emotion/no-vanilla": "error",
"emotion/import-from-emotion": "error",
"emotion/styled-import": "error",
"prettier/prettier": "error",
"no-global-assign": "error",
"require-yield": "off",
"no-unused-expressions": ["error", {"allowTernary": true, "allowShortCircuit": true}],
"arrow-parens": ["off"],
"compat/compat": "error",
"consistent-return": "off",
"comma-dangle": ["error", "only-multiline"],
"generator-star-spacing": "off",
"import/extensions": "off",
"import/no-unresolved": "off",
"import/named": "off",
"import/no-extraneous-dependencies": "off",
"jsx-a11y/anchor-is-valid": "off",
"no-use-before-define": "off",
"no-multi-assign": "error",
"eqeqeq": ["error", "always"],
"react/sort-comp": ["error", {
"order": ["type-annotations", "static-methods", "lifecycle", "everything-else", "render"]
}],
"react/jsx-no-bind": "error",
"react/jsx-filename-extension": ["error", { "extensions": [".js", ".jsx"] }],
"react/jsx-sort-props": ["off", {
"ignoreCase": true,
"callbacksLast": false,
"shorthandFirst": true,
"shorthandLast": false,
"noSortAlphabetically": false,
"reservedFirst": false,
}],
"react/prop-types": "warn",
"react/forbid-prop-types": [
"warn",
{ "forbid": ["any"] }
],
"react/no-direct-mutation-state": "error",
"react/sort-prop-types": ["off", {
"callbacksLast": true,
"ignoreCase": true,
"requiredFirst": false,
"sortShapeProp": true
}],
"react/require-default-props": [1, { "forbidDefaultForRequired": true }],
"react/jsx-curly-spacing": ["warn", "never"],
"react/jsx-fragments": ["warn", "element"],
"react/destructuring assignment": ["warn", "always"],
"sort-imports": ["warn", {
"ignoreCase": false,
"ignoreMemberSort": false,
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"]
}],
"sort-keys": ["off", "asc", {"caseSensitive": true, "natural": false}]
},
"plugins": [
"prettier",
"flowtype",
"import",
"promise",
"compat",
"react",
"emotion"
],
"settings": {
"import/resolver": {
"babel-module": {},
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment