Skip to content

Instantly share code, notes, and snippets.

@piersadrian
Created December 31, 2016 17:32
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 piersadrian/86154d4378e9a01ffa77726f8147c2f0 to your computer and use it in GitHub Desktop.
Save piersadrian/86154d4378e9a01ffa77726f8147c2f0 to your computer and use it in GitHub Desktop.
{
"extends": [
"plugin:lodash/recommended",
"plugin:react/recommended",
"react-app"
],
"plugins": [
"import",
"flowtype",
"jsx-a11y",
"lodash",
"react"
],
"rules": {
// ESLINT
"arrow-body-style": "warn",
"arrow-parens": ["warn", "always"],
"complexity": ["error", { "max": 10 }],
"no-console": ["warn", { "allow": ["warn", "error"] }],
"no-param-reassign": ["warn", { "props": false }],
"no-underscore-dangle": ["warn", { "allow": ["_id"] }],
"prefer-arrow-callback": ["warn", { "allowNamedFunctions": true }],
"semi": ["warn", "never"],
"sort-vars": "warn",
"space-before-function-paren": 0,
// IMPORT
"import/default": "error",
"import/export": "error",
"import/first": 0,
"import/named": "error",
"import/namespace": "error",
"import/no-amd": "error",
"import/no-commonjs": "error",
"import/no-extraneous-dependencies": "warn",
"import/no-unresolved": "error",
"import/order": ["error", {
"newlines-between": "always"
}],
// REACT
"react/jsx-filename-extension": ["warn", { "extensions": [".js"] }],
"react/no-multi-comp": ["error", { "ignoreStateless": true }],
"react/prefer-es6-class": "error",
"react/prefer-stateless-function": "error",
"react/sort-comp": ["warn"],
"react/sort-prop-types": ["warn", { "ignoreCase": true }],
// JSX-A11Y
"jsx-a11y/anchor-has-content": "error",
"jsx-a11y/aria-props": "error",
"jsx-a11y/aria-role": "error",
"jsx-a11y/img-has-alt": "error",
"jsx-a11y/img-redundant-alt": "error",
"jsx-a11y/label-has-for": "error",
"jsx-a11y/no-access-key": "error",
"jsx-a11y/no-static-element-interactions": "error",
"jsx-a11y/tabindex-no-positive": "error"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment