Skip to content

Instantly share code, notes, and snippets.

@heygema
Last active February 8, 2018 05:50
Show Gist options
  • Save heygema/96fa151d2b66860383a5d10aac0d653a to your computer and use it in GitHub Desktop.
Save heygema/96fa151d2b66860383a5d10aac0d653a to your computer and use it in GitHub Desktop.
Eslint Setup
/node_modules
/coverage
/flow-typed/npm
/src/registerServiceWorker.js
*.json
{
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"modules": true
}
},
"parser": "babel-eslint",
"extends": ["plugin:flowtype/recommended", "plugin:react/recommended"],
"plugins": ["babel", "flowtype", "react"],
"env": {
"browser": true,
"node": true
},
"globals": {
"fetch": false,
"FormData": false,
"ImageSource": false,
"Map": false,
"Set": false,
"StyleSet": false,
"ReactNode": false,
"Promise": false,
"navigator": false,
"describe": false,
"it": false,
"expect": false,
"jest": false,
"beforeAll": false,
"beforeEach": false
},
"rules": {
"flowtype/delimiter-dangle": [1, "always-multiline"],
"flowtype/no-dupe-keys": 2,
"flowtype/object-type-delimiter": [1, "semicolon"],
"flowtype/semi": 1,
"flowtype/type-id-match": [1, "^[A-Z]"],
"no-cond-assign": 1,
"no-console": 0,
"no-constant-condition": 1,
"comma-dangle": [
1,
{
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "always-multiline"
}
],
"no-control-regex": 1,
"no-debugger": 1,
"no-dupe-keys": 1,
"no-dupe-args": 1,
"no-duplicate-case": 1,
"no-empty": 0,
"no-empty-character-class": 1,
"no-ex-assign": 1,
"no-extra-boolean-cast": 1,
"no-extra-semi": 1,
"no-func-assign": 1,
"no-inner-declarations": 0,
"no-invalid-regexp": 1,
"no-negated-in-lhs": 1,
"no-obj-calls": 1,
"no-regex-spaces": 1,
"no-reserved-keys": 0,
"no-sparse-arrays": 1,
"no-unreachable": 1,
"use-isnan": 1,
"valid-jsdoc": 0,
"valid-typeof": 1,
"block-scoped-var": 0,
"complexity": 0,
"consistent-return": 0,
"curly": 1,
"default-case": 0,
"dot-notation": 0,
"eqeqeq": [1, "allow-null"],
"guard-for-in": 1,
"no-alert": 1,
"no-caller": 1,
"no-div-regex": 1,
"no-else-return": 0,
"no-eq-null": 0,
"no-eval": 1,
"no-extend-native": 1,
"no-extra-bind": 1,
"no-fallthrough": 1,
"no-floating-decimal": 1,
"no-implied-eval": 1,
"no-labels": 1,
"no-iterator": 1,
"no-lone-blocks": 1,
"no-loop-func": 0,
"no-multi-str": 0,
"no-native-reassign": 0,
"no-new": 1,
"no-new-func": 1,
"no-new-wrappers": 1,
"no-octal": 1,
"no-octal-escape": 1,
"no-proto": 1,
"no-redeclare": 1,
"no-return-assign": 1,
"no-script-url": 1,
"no-self-compare": 1,
"no-sequences": 1,
"no-unused-expressions": 0,
"no-void": 1,
"no-warning-comments": 0,
"no-with": 1,
"radix": 1,
"vars-on-top": 0,
"wrap-iife": 0,
"yoda": 1,
"strict": 0,
"no-catch-shadow": 1,
"no-delete-var": 1,
"no-label-var": 1,
"no-shadow": 0,
"no-shadow-restricted-names": 1,
"no-undef": 1,
"no-undefined": 0,
"no-undef-init": 0,
"no-unused-vars": 1,
"no-use-before-define": 0,
"handle-callback-err": 1,
"no-mixed-requires": 1,
"no-new-require": 1,
"no-path-concat": 1,
"no-process-exit": 0,
"no-restricted-modules": 1,
"no-sync": 0,
"jsx-quotes": [1, "prefer-double"],
"react/jsx-closing-bracket-location": [1],
"react/jsx-indent": 0,
"react/jsx-tag-spacing": [
1,
{
"beforeSelfClosing": "always"
}
],
"react/jsx-equals-spacing": 1,
"react/jsx-curly-spacing": [1, "never"],
"key-spacing": 1,
"comma-spacing": 1,
"no-multi-spaces": 1,
"brace-style": [
1,
"1tbs",
{
"allowSingleLine": false
}
],
"camelcase": [1, {"properties": "never"}],
"consistent-this": [1, "self"],
"eol-last": 1,
"func-names": 0,
"func-style": 0,
"new-cap": 0,
"new-parens": 1,
"no-nested-ternary": 0,
"no-array-constructor": 1,
"no-lonely-if": 0,
"no-new-object": 1,
"no-spaced-func": 1,
"semi-spacing": 1,
"no-ternary": 0,
"no-trailing-spaces": 1,
"no-underscore-dangle": 0,
"no-mixed-spaces-and-tabs": 1,
"indent": 0,
"quotes": [
1,
"single",
{"avoidEscape": true, "allowTemplateLiterals": true}
],
"quote-props": [1, "as-needed"],
"semi": 1,
"sort-vars": 0,
"keyword-spacing": 1,
"space-before-blocks": 1,
"space-before-function-paren": [
1,
{
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}
],
"babel/object-curly-spacing": [1, "never"],
"array-bracket-spacing": [1, "never"],
"space-in-parens": 1,
"space-infix-ops": 1,
"space-unary-ops": 1,
"max-nested-callbacks": 0,
"one-var": [1, "never"],
"wrap-regex": 0,
"arrow-parens": 1,
"arrow-spacing": 1,
"constructor-super": 1,
"generator-star-spacing": 0,
"no-class-assign": 1,
"no-const-assign": 1,
"no-dupe-class-members": 1,
"no-this-before-super": 1,
"no-var": 0,
"object-shorthand": 0,
"prefer-arrow-callback": 1,
"prefer-const": 0,
"prefer-reflect": 0,
"prefer-spread": 0,
"prefer-template": 0,
"require-yield": 0,
"max-depth": 0,
"max-params": 0,
"max-statements": 0,
"no-bitwise": 0,
"no-plusplus": 0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment