Created
October 22, 2015 03:44
-
-
Save yangshun/4092daa923c14f1a30c7 to your computer and use it in GitHub Desktop.
An eslint configuration that I adhere to
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"parser": "babel-eslint", | |
"ecmaFeatures": { | |
"jsx": true, | |
"arrowFunctions": true, | |
"blockBindings": true, | |
"generators": true | |
}, | |
"rules": { | |
"accessor-pairs": 0, | |
"array-bracket-spacing": [ 2, "never" ], | |
"arrow-parens": [ 2, "always" ], | |
"arrow-spacing": 2, | |
"block-scoped-var": 0, | |
"block-spacing": [ 2, "always" ], | |
"brace-style": [ 2, "1tbs", { "allowSingleLine": true } ], | |
"camelcase": [ 2, {"properties": "never"} ], | |
"comma-dangle": [ 2, "never" ], | |
"comma-spacing": [ 2, { "before": false, "after": true } ], | |
"comma-style": [ 2, "last" ], | |
"complexity": 0, | |
"computed-property-spacing": [ 2, "never" ], | |
"consistent-return": 2, | |
"consistent-this": [ 2, "self" ], | |
"curly": 2, | |
"default-case": 0, | |
"dot-notation": 2, | |
"dot-location": [ 2, "property" ], | |
"eol-last": 2, | |
"eqeqeq": 2, | |
"func-names": 0, | |
"func-style": [ 2, "declaration", { "allowArrowFunctions": true } ], | |
"guard-for-in": 2, | |
"id-length": [ 2, { "exceptions": [ "$", "_", "q", "i" ] } ], | |
"init-declarations": 0, | |
"jsx-quotes": [ 2, "prefer-double" ], | |
"key-spacing": [ 2, { "afterColon": true } ], | |
"new-cap": [ 1, { "capIsNew": false } ], | |
"new-parens": 0, | |
"no-caller": 2, | |
"no-catch-shadow": 2, | |
"no-class-assign": 2, | |
"no-cond-assign": [ 2, "always" ], | |
"no-console": 0, | |
"no-const-assign": 2, | |
"no-constant-condition": 0, | |
"no-control-regex": 2, | |
"no-debugger": 0, | |
"no-delete-var": 2, | |
"no-div-regex": 2, | |
"no-dupe-args": 2, | |
"no-dupe-class-members": 2, | |
"no-dupe-keys": 2, | |
"no-duplicate-case": 2, | |
"no-else-return": 2, | |
"no-empty": 2, | |
"no-empty-character-class": 2, | |
"no-empty-label": 2, | |
"no-eq-null": 2, | |
"no-eval": 2, | |
"no-ex-assign": 2, | |
"no-extend-native": 0, | |
"no-extra-bind": 0, | |
"no-extra-boolean-cast": 2, | |
"no-extra-parens": 0, | |
"no-extra-semi": 2, | |
"no-fallthrough": 2, | |
"no-floating-decimal": 2, | |
"no-func-assign": 2, | |
"no-implicit-coercion": 2, | |
"no-implied-eval": 2, | |
"no-inner-declarations": 0, | |
"no-invalid-regexp": 2, | |
"no-irregular-whitespace": 2, | |
"no-iterator": 2, | |
"no-label-var": 2, | |
"no-labels": 2, | |
"no-lone-blocks": 2, | |
"no-loop-func": 0, | |
"no-mixed-spaces-and-tabs": 2, | |
"no-multi-spaces": 2, | |
"no-multi-str": 2, | |
"no-multiple-empty-lines": [ 2, { "max": 1 } ], | |
"no-native-reassign": 2, | |
"no-negated-in-lhs": 2, | |
"no-new": 2, | |
"no-new-func": 2, | |
"no-new-wrappers": 2, | |
"no-obj-calls": 2, | |
"no-octal": 2, | |
"no-octal-escape": 2, | |
"no-process-env": 0, | |
"no-proto": 2, | |
"no-redeclare": 2, | |
"no-regex-spaces": 2, | |
"no-return-assign": 2, | |
"no-script-url": 2, | |
"no-self-compare": 2, | |
"no-sequences": 2, | |
"no-shadow": 2, | |
"no-shadow-restricted-names": 2, | |
"no-sparse-arrays": 2, | |
"no-throw-literal": 2, | |
"no-trailing-spaces": 2, | |
"no-undef": 2, | |
"no-undef-init": 2, | |
"no-underscore-dangle": 0, | |
"no-unexpected-multiline": 2, | |
"no-unreachable": 2, | |
"no-useless-call": 2, | |
"no-useless-concat": 2, | |
"no-unused-expressions": 0, | |
"no-unused-vars": 0, | |
"no-use-before-define": 2, | |
"no-void": 2, | |
"no-warning-comments": 0, | |
"no-with": 2, | |
"object-curly-spacing": [ 2, "always" ], | |
"padded-blocks": [ 2, "never" ], | |
"quote-props": [ 2, "as-needed", { "keywords": true } ], | |
"quotes": [ 2, "single", "avoid-escape" ], | |
"radix": 0, | |
"semi": [ 2, "always" ], | |
"semi-spacing": [ 2, { "before": false, "after": true } ], | |
"space-after-keywords": [ 2, "always" ], | |
"space-before-blocks": 2, | |
"space-before-function-paren": [ 2, { "anonymous": "always", "named": "never" } ], | |
"space-before-keywords": [ 2, "always" ], | |
"space-in-parens": [ 2, "never" ], | |
"space-infix-ops": 2, | |
"space-return-throw-case": 2, | |
"space-unary-ops": [ 2, { "words": true, "nonwords": false } ], | |
"spaced-comment": [ 2, "always" ], | |
"strict": [ 2, "global" ], | |
"use-isnan": 2, | |
"valid-jsdoc": 2, | |
"valid-typeof": 2, | |
"vars-on-top": 0, | |
"wrap-iife": [ 2, "any" ], | |
"yoda": [ 2, "never" ] | |
}, | |
"env": { | |
"node": true, | |
"browser": true, | |
"es6": true, | |
"mocha": true | |
}, | |
"globals": { | |
"IS_SERVER": true, | |
"sinon": true, | |
"expect": true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment