Skip to content

Instantly share code, notes, and snippets.

@mpyw
Created April 29, 2018 12:33
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 mpyw/c0254e24d76e502ef5c0ccd24843f0fb to your computer and use it in GitHub Desktop.
Save mpyw/c0254e24d76e502ef5c0ccd24843f0fb to your computer and use it in GitHub Desktop.
ESLint
{
"extends": "standard",
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module",
"allowImportExportEverywhere": false
},
"env": {
"browser": true,
"node": true,
"es6": true,
"jest/globals": true
},
"plugins": [
"react",
"jest"
],
"rules": {
"comma-dangle": ["error", "always-multiline"],
"generator-star-spacing": ["error", {
"before": false,
"after": true,
"anonymous": "after",
"method": { "before": false, "after": false }
}],
"no-extra-parens": ["error", "all", {
"conditionalAssign": false,
"returnAssign": false,
"nestedBinaryExpressions": false,
"ignoreJSX": "all",
"enforceForArrowConditionals": false
}],
"object-curly-newline": "off",
"padded-blocks": "off",
"space-before-function-paren": ["error", {
"anonymous": "always",
"named": "never",
"asyncArrow": "always"
}],
"wrap-iife": ["error", "inside", { "functionPrototypeMethods": true }],
"yield-star-spacing": ["error", "after"],
"standard/array-bracket-even-spacing": "off",
"standard/computed-property-even-spacing": "off",
"standard/object-curly-even-spacing": "off",
"array-bracket-spacing": ["error", "never"],
"computed-property-spacing": ["error", "never"],
"guard-for-in": "error",
"jsx-quotes": ["error", "prefer-double"],
"linebreak-style": "error",
"no-var": "error",
"no-void": "error",
"object-curly-spacing": ["error", "always"],
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-destructuring": ["error", { "array": false }],
"prefer-numeric-literals": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"react/jsx-closing-bracket-location": "error",
"react/jsx-closing-tag-location": "error",
"react/jsx-curly-spacing": ["error", { "when": "never" }],
"react/jsx-equals-spacing": ["error", "never"],
"react/jsx-first-prop-new-line": ["error", "multiline"],
"react/jsx-indent": ["error", 2],
"react/jsx-indent-props": ["error", 2],
"react/jsx-no-comment-textnodes": "error",
"react/jsx-no-duplicate-props": "error",
"react/jsx-no-target-blank": "error",
"react/jsx-no-undef": "error",
"react/jsx-pascal-case": "error",
"react/jsx-tag-spacing": "error",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/jsx-wrap-multilines": "error",
"react/no-children-prop": "error",
"react/no-deprecated": "error",
"react/no-did-mount-set-state": "error",
"react/no-did-update-set-state": "error",
"react/no-direct-mutation-state": "error",
"react/no-find-dom-node": "error",
"react/no-is-mounted": "error",
"react/no-redundant-should-component-update": "error",
"react/no-render-return-value": "error",
"react/no-string-refs": "error",
"react/no-will-update-set-state": "error",
"react/prop-types": "error",
"react/react-in-jsx-scope": "error",
"react/require-render-return": "error",
"react/self-closing-comp": "error",
"react/sort-comp": "error",
"react/style-prop-object": "error",
"react/void-dom-elements-no-children": "error",
"react/jsx-key": "warn",
"react/no-array-index-key": "warn",
"react/prefer-stateless-function": "warn"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment