Created
April 11, 2016 23:43
-
-
Save L3V147H4N/9f28b9122ef9796b92459576ad173e6a to your computer and use it in GitHub Desktop.
ESLINT
This file contains 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
{ | |
"env": { | |
//enable nodejs environment | |
"node": true, | |
//enable browser environment | |
"browser": true | |
}, | |
"globals": { | |
"Promise" : true | |
}, | |
"plugins": [ | |
"react" | |
], | |
"settings": { | |
"react": { | |
"pragma": "React", // Pragma to use, default to "React" | |
"version": "0.14.7" // React version, default to the latest React stable release | |
} | |
}, | |
"parser": "babel-eslint", | |
"parserOptions": { | |
"ecmaVersion" : 6, | |
"sourceType": "module", | |
"ecmaFeatures": { | |
"jsx": true | |
} | |
}, | |
"strict" : "safe", | |
// code style | |
"rules": { | |
//enable ESLint rules, such as | |
"block-spacing": [2, "always"], | |
"brace-style": [2, "1tbs", { "allowSingleLine": true }], | |
"array-bracket-spacing" : [2, "always", { "singleValue" : false, "arraysInArrays" : false, "objectsInArrays": false }], | |
"camelcase": [2, {"properties": "always"}], | |
"comma-spacing": [2, {"before": false, "after": true}], | |
"comma-style": [2, "last"], | |
"computed-property-spacing": [2, "never"], | |
"eqeqeq": 1, | |
"func-names": 2, | |
"indent": [2, 2, {"SwitchCase": 1}], | |
"key-spacing": [2, {"beforeColon": true, "afterColon": true}], | |
"keyword-spacing": 2, | |
"max-depth": [2, {"maximum": 8}], | |
"max-len": [1, 120, 4], | |
"max-nested-callbacks": [2, {"maximum": 3}], | |
"new-cap": 2, | |
"new-parens": 2, | |
"newline-after-var": [2, "always"], | |
"newline-before-return": "error", | |
"newline-per-chained-call": [2, {"ignoreChainWithDepth": 3}], | |
"no-lonely-if": 2, | |
"no-mixed-spaces-and-tabs": 2, | |
"no-multiple-empty-lines": [2, {"max": 1}], | |
"no-nested-ternary": 2, | |
"no-new-object": 2, | |
"no-undef": 2, | |
"no-undef-init": 2, | |
"no-use-before-define": 2, | |
"no-shadow": 2, | |
"no-spaced-func": 2, | |
"no-trailing-spaces": 2, | |
"no-unneeded-ternary": 2, | |
"no-whitespace-before-property": 2, | |
"object-curly-spacing": [2, "always"], | |
"one-var": [2, "always"], | |
"one-var-declaration-per-line": [2, "always"], | |
"semi": [2, "always"], | |
"semi-spacing": 2, | |
"space-before-blocks": 2, | |
"space-before-function-paren": 2, | |
"space-infix-ops": 2, | |
"space-unary-ops": 2, | |
"spaced-comment": [2, "always"], | |
"arrow-spacing": [2, { "before": true, "after": true }] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment