ESLint 发现太多警告(最多:0)并且我无法在 firebase 函数上部署

pho*_*ong 5 javascript transpiler firebase eslint google-cloud-functions

我不确定是什么阻止我在 firebase 上部署 它阻止我部署到 firebase 功能。

\n\n
firebase deploy --only functions\n
Run Code Online (Sandbox Code Playgroud)\n\n

谁能帮我看看问题出在哪里

\n\n
  174:75  warning  Unexpected function expression      prefer-arrow-callback\n  190:28  warning  Unexpected function expression      prefer-arrow-callback\n  196:34  warning  Unexpected function expression      prefer-arrow-callback\n  239:36  warning  Unexpected function expression      prefer-arrow-callback\n  291:86  warning  Unexpected function expression      prefer-arrow-callback\n  297:26  warning  Unexpected function expression      prefer-arrow-callback\n  317:43  warning  Unexpected function expression      prefer-arrow-callback\n  378:31  warning  Don't make functions within a loop  no-loop-func\n  477:31  warning  Don't make functions within a loop  no-loop-func\n\n\xe2\x9c\x96 9 problems (0 errors, 9 warnings)\n  0 errors, 7 warnings potentially fixable with the `--fix` option.\n\nESLint found too many warnings (maximum: 0).\nnpm ERR! code ELIFECYCLE\nnpm ERR! errno 1\nnpm ERR! es2017-functions@ lint: `eslint --max-warnings=0 .`\nnpm ERR! Exit status 1\nnpm ERR! \nnpm ERR! Failed at the es2017-functions@ lint script.\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR!     /Users/phongyewtong/.npm/_logs/2018-06-10T05_04_47_670Z-debug.log\n\nError: functions predeploy error: Command terminated with non-zero exit code1\n
Run Code Online (Sandbox Code Playgroud)\n

pho*_*ong 0

我想我通过将警告增加到 20 来解决这个问题。

在控制台中输入此内容。

eslint --max-warnings=20
Run Code Online (Sandbox Code Playgroud)

  • 这没有解决根本问题。 (2认同)