Merge pull request babel/eslint-config-babel#9 from kaicataldo/prefer-const

Enable prefer-const
This commit is contained in:
Henry Zhu 2017-01-08 22:19:01 -05:00
parent 1f4e239217
commit 6117b83b55

View File

@ -1,65 +1,54 @@
module.exports = { module.exports = {
parser: "babel-eslint", parser: "babel-eslint",
extends: "eslint:recommended", extends: "eslint:recommended",
plugins: ["flowtype", "babel"], plugins: ["flowtype"],
rules: { rules: {
"flowtype/define-flow-type": "warn", "arrow-parens": ["error", "always"],
"flowtype/use-flow-type": "warn", "arrow-spacing": ["error", { before: true, after: true }],
quotes: ["error", "double"],
"linebreak-style": ["error", "unix"],
"no-var": "error",
"keyword-spacing": "error",
strict: "off",
"no-underscore-dangle": "off",
curly: "off",
"no-multi-spaces": "off",
"key-spacing": "off",
"no-return-assign": "off",
"consistent-return": "off",
"no-shadow": "off",
"comma-dangle": "off",
"no-use-before-define": "off",
"no-empty": "off",
"new-parens": "off",
"no-cond-assign": "off",
"no-fallthrough": "off",
"new-cap": "off",
"no-loop-func": "off",
"no-unreachable": "off",
"no-labels": "off",
"no-process-exit": "off",
"no-trailing-spaces": "error",
camelcase: "off", camelcase: "off",
"comma-dangle": "off",
"consistent-return": "off",
curly: "off",
"indent": ["error", 2],
"linebreak-style": ["error", "unix"],
"key-spacing": "off",
"keyword-spacing": "error",
"max-len": ["error", 110, 2],
"new-cap": "off",
"new-parens": "off",
"no-case-declarations": "off",
"no-cond-assign": "off",
"no-confusing-arrow": "error",
"no-console": "off", "no-console": "off",
"no-constant-condition": "off", "no-constant-condition": "off",
"no-empty": "off",
"no-fallthrough": "off",
"no-inner-declarations": "off", "no-inner-declarations": "off",
"no-case-declarations": "off", "no-multi-spaces": "off",
semi: ["error", "always"], "no-labels": "off",
"no-loop-func": "off",
// soft indent of 2 characters "no-process-exit": "off",
"indent": ["error", 2], "no-return-assign": "off",
"no-shadow": "off",
// maximum length of 110 characters "no-trailing-spaces": "error",
"max-len": ["error", 110, 2], "no-underscore-dangle": "off",
"no-unreachable": "off",
// Enforce parens around arrow function arguments "no-use-before-define": "off",
"arrow-parens": ["error", "always"], "no-var": "error",
// Require a space on each side of arrow operator "prefer-const": "error",
"arrow-spacing": ["error", { before: true, after: true }], quotes: ["error", "double"],
// Require a space on each side of all infix operators "space-before-blocks": ["error", "always"],
"space-infix-ops": "error", "space-infix-ops": "error",
// Prevent using => in a condition where <= is intended semi: ["error", "always"],
"no-confusing-arrow": "error", strict: "off"
// prevent no space in `if (){` "flowtype/define-flow-type": "warn",
"space-before-blocks": ["error", "always"] "flowtype/use-flow-type": "warn",
}, },
globals: { globals: {
// Flow // Flow
Iterator: true, Iterator: true,
$Keys: true $Keys: true
}, },
env: { env: {
node: true, node: true,
es6: true, es6: true,