From 194ce9687cac630a02f104cf3fca9ca46d421663 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Thu, 31 Oct 2019 15:25:19 +0800 Subject: [PATCH] chore: turn all eslint rules on as an error --- .eslintrc | 78 +++++++++++++++++++------------------- lib/routes/szse/inquire.js | 2 - 2 files changed, 39 insertions(+), 41 deletions(-) diff --git a/.eslintrc b/.eslintrc index c726440da..ee8c2132f 100644 --- a/.eslintrc +++ b/.eslintrc @@ -10,47 +10,47 @@ "es6": true }, "rules": { - "no-console": 1, - "block-scoped-var": 1, - "curly": 1, - "eqeqeq": 1, - "no-global-assign": 1, - "no-implicit-globals": 1, - "no-labels": 1, - "no-multi-str": 1, - "comma-spacing": 1, - "comma-style": 1, - "func-call-spacing": 1, - "keyword-spacing": 1, - "linebreak-style": 1, - "lines-around-comment": 1, - "no-multiple-empty-lines": 1, - "space-infix-ops": 1, - "arrow-spacing": 1, - "no-var": 1, - "prefer-const": 1, - "no-unsafe-negation": 1, - "array-callback-return": 1, - "dot-notation": 1, - "no-eval": 1, - "no-extend-native": 1, - "no-extra-label": 1, - "semi": 1, - "space-before-blocks": 1, - "space-in-parens": 1, - "space-unary-ops": 1, - "spaced-comment": 1, - "arrow-body-style": 1, - "arrow-parens": 1, - "no-restricted-imports": 1, - "no-duplicate-imports": 1, - "no-useless-computed-key": 1, - "no-useless-rename": 1, - "rest-spread-spacing": 1, - "no-trailing-spaces": 1, + "no-console": 2, + "block-scoped-var": 2, + "curly": 2, + "eqeqeq": 2, + "no-global-assign": 2, + "no-implicit-globals": 2, + "no-labels": 2, + "no-multi-str": 2, + "comma-spacing": 2, + "comma-style": 2, + "func-call-spacing": 2, + "keyword-spacing": 2, + "linebreak-style": 2, + "lines-around-comment": 2, + "no-multiple-empty-lines": 2, + "space-infix-ops": 2, + "arrow-spacing": 2, + "no-var": 2, + "prefer-const": 2, + "no-unsafe-negation": 2, + "array-callback-return": 2, + "dot-notation": 2, + "no-eval": 2, + "no-extend-native": 2, + "no-extra-label": 2, + "semi": 2, + "space-before-blocks": 2, + "space-in-parens": 2, + "space-unary-ops": 2, + "spaced-comment": 2, + "arrow-body-style": 2, + "arrow-parens": 2, + "no-restricted-imports": 2, + "no-duplicate-imports": 2, + "no-useless-computed-key": 2, + "no-useless-rename": 2, + "rest-spread-spacing": 2, + "no-trailing-spaces": 2, "no-control-regex": 0, "prettier/prettier": 0, - "no-await-in-loop": 1, + "no-await-in-loop": 2, "require-atomic-updates": 0, "no-prototype-builtins": 0 } diff --git a/lib/routes/szse/inquire.js b/lib/routes/szse/inquire.js index 1d616d84c..e0ac20465 100644 --- a/lib/routes/szse/inquire.js +++ b/lib/routes/szse/inquire.js @@ -40,8 +40,6 @@ module.exports = async (ctx) => { for (let i = 0; i < ptype[key].dataArr.length; i++) { ptype[key].dataArr[i].category = ptype[key].dataCategory; } - } else { - console.log(key); } }