Skip to content

Instantly share code, notes, and snippets.

@ide
Created August 17, 2015 21:01
Show Gist options
  • Save ide/4c9b3de2ae9e952c8b3d to your computer and use it in GitHub Desktop.
Save ide/4c9b3de2ae9e952c8b3d to your computer and use it in GitHub Desktop.
.eslintrc
{
"parser": "babel-eslint",
"ecmaFeatures": {
"jsx": true
},
"env": {
"es6": true,
"jasmine": true,
"node": true
},
// Map from global var to bool specifying if it can be redefined
"globals": {
"__DEV__": false,
"Promise": false,
"XMLHttpRequest": false,
"fetch": false
},
"plugins": [
"react"
],
"rules": {
"no-alert": 1,
"no-array-constructor": 1,
"no-bitwise": 0,
"no-caller": 1,
"no-catch-shadow": 0,
"no-class-assign": 0,
"no-cond-assign": 1,
"no-console": 0,
"no-const-assign": 2,
"no-constant-condition": 1,
"no-continue": 0,
"no-control-regex": 1,
"no-debugger": 1,
"no-delete-var": 2,
"no-div-regex": 1,
"no-dupe-keys": 2,
"no-dupe-args": 2,
"no-duplicate-case": 2,
"no-else-return": 0,
"no-empty": 0,
"no-empty-character-class": 1,
"no-empty-label": 1,
"no-eq-null": 0,
"no-eval": 1,
"no-ex-assign": 1,
"no-extend-native": 1,
"no-extra-bind": 1,
"no-extra-boolean-cast": 1,
"no-extra-parens": 0,
"no-extra-semi": 1,
"no-fallthrough": 1,
"no-floating-decimal": 1,
"no-func-assign": 2,
"no-implied-eval": 1,
"no-inline-comments": 0,
"no-inner-declarations": [0, "functions"],
"no-invalid-regexp": 2,
"no-irregular-whitespace": 1,
"no-iterator": 1,
"no-label-var": 1,
"no-labels": 1,
"no-lone-blocks": 1,
"no-lonely-if": 0,
"no-loop-func": 0,
"no-mixed-requires": [0, false],
"no-mixed-spaces-and-tabs": [1, false],
"no-multi-spaces": 0,
"no-multi-str": 0,
"no-multiple-empty-lines": [0, {"max": 2}],
"no-native-reassign": 0,
"no-negated-in-lhs": 1,
"no-nested-ternary": 0,
"no-new": 1,
"no-new-func": 1,
"no-new-object": 1,
"no-new-require": 1,
"no-new-wrappers": 1,
"no-obj-calls": 1,
"no-octal": 1,
"no-octal-escape": 1,
"no-param-reassign": 0,
"no-path-concat": 1,
"no-plusplus": 0,
"no-process-env": 0,
"no-process-exit": 0,
"no-proto": 1,
"no-redeclare": 1,
"no-regex-spaces": 0,
"no-reserved-keys": 0,
"no-restricted-modules": 0,
"no-return-assign": 1,
"no-script-url": 1,
"no-self-compare": 1,
"no-sequences": 1,
"no-shadow": 0,
"no-shadow-restricted-names": 1,
"no-spaced-func": 1,
"no-sparse-arrays": 1,
"no-sync": 0,
"no-ternary": 0,
"no-trailing-spaces": 1,
"no-this-before-super": 0,
"no-throw-literal": 1,
"no-undef": 2,
"no-undef-init": 0,
"no-undefined": 0,
"no-unexpected-multiline": 1,
"no-underscore-dangle": 0,
"no-unneeded-ternary": 1,
"no-unreachable": 1,
"no-unused-expressions": 1,
"no-unused-vars": [1, {"vars": "all", "args": "none"}],
"no-use-before-define": 0,
"no-useless-call": 0,
"no-void": 1,
"no-var": 0,
"no-warning-comments": [0, { "terms": ["todo", "fixme", "xxx"], "location": "start" }],
"no-with": 1,
"array-bracket-spacing": [1, "never"],
"arrow-parens": 0,
"arrow-spacing": [1, { "before": true, "after": true }],
"accessor-pairs": 0,
"block-scoped-var": 0,
"brace-style": [0, "1tbs"],
"callback-return": 0,
"camelcase": 0,
"comma-dangle": [1, "always-multiline"],
"comma-spacing": [1, {"before": false, "after": true}],
"comma-style": [1, "last"],
"complexity": [0, 11],
"computed-property-spacing": [0, "never"],
"consistent-return": 0,
"consistent-this": [0, "self"],
"constructor-super": 1,
"curly": [1, "all"],
"default-case": 0,
"dot-location": [1, "property"],
"dot-notation": [0, { "allowKeywords": true }],
"eol-last": 1,
"eqeqeq": [1, "smart"],
"func-names": 0,
"func-style": [0, "declaration"],
"generator-star-spacing": [1, "after"],
"guard-for-in": 0,
"handle-callback-err": [1, "^(err|error)$"],
"indent": [0, 2],
"init-declarations": 0,
"key-spacing": [0, { "beforeColon": false, "afterColon": true }],
"linebreak-style": [0, "unix"],
"lines-around-comment": 0,
"max-depth": [0, 4],
"max-len": [0, 80, 4],
"max-nested-callbacks": [0, 2],
"max-params": [0, 3],
"max-statements": [0, 10],
"new-cap": 0,
"new-parens": 1,
"newline-after-var": 0,
"object-curly-spacing": [0, "always", { "objectsInObjects": false }],
"object-shorthand": [1, "always"],
"one-var": [0, "never"],
"operator-assignment": [0, "always"],
"operator-linebreak": [1, "after"],
"padded-blocks": 0,
"prefer-const": 0,
"prefer-spread": 1,
"quote-props": 0,
"quotes": [1, "single", "avoid-escape"],
"radix": 1,
"require-yield": 0,
"semi": 1,
"semi-spacing": [1, { "before": false, "after": true }],
"sort-vars": 0,
"space-after-keywords": [1, "always"],
"space-before-blocks": [1, "always"],
"space-before-function-paren": [1, { "anonymous": "never", "named": "never" }],
"space-in-parens": [1, "never"],
"space-infix-ops": 1,
"space-return-throw-case": 1,
"space-unary-ops": [0, { "words": true, "nonwords": false }],
"spaced-comment": 0,
"strict": [1, "global"],
"use-isnan": 2,
"valid-jsdoc": 0,
"valid-typeof": 2,
"vars-on-top": 0,
"wrap-iife": 0,
"wrap-regex": 0,
"yoda": [1, "never", { "exceptRange": false }],
// React
"react/display-name": [1, { "acceptTranspilerName": true }],
"react/jsx-boolean-value": [1, "never"],
"react/jsx-no-undef": 2,
"react/jsx-quotes": [1, "double", "avoid-escape"],
"react/jsx-sort-prop-types": 0,
"react/jsx-sort-props": 0,
"react/jsx-uses-react": 1,
"react/jsx-uses-vars": 1,
"react/no-danger": 0,
"react/no-did-mount-set-state": [1, "allow-in-func"],
"react/no-did-update-set-state": [1, "allow-in-func"],
"react/no-multi-comp": 0,
"react/no-unknown-property": 1,
"react/prop-types": 0,
"react/react-in-jsx-scope": 2,
"react/require-extension": 1,
"react/self-closing-comp": 1,
"react/sort-comp": 0,
"react/wrap-multilines": [1, { "declaration": false, "assignment": false, "return": true}]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment