Javascript ESLint发现太多警告(最大值:0),我无法在firebase函数上部署
我不确定是什么阻止我在firebase上部署其阻止我部署到firebase功能Javascript ESLint发现太多警告(最大值:0),我无法在firebase函数上部署,javascript,firebase,google-cloud-functions,eslint,transpiler,Javascript,Firebase,Google Cloud Functions,Eslint,Transpiler,我不确定是什么阻止我在firebase上部署其阻止我部署到firebase功能 firebase deploy --only functions 谁能帮我看看有什么问题吗 174:75 warning Unexpected function expression prefer-arrow-callback 190:28 warning Unexpected function expression prefer-arrow-callback 196:34
firebase deploy --only functions
谁能帮我看看有什么问题吗
174:75 warning Unexpected function expression prefer-arrow-callback
190:28 warning Unexpected function expression prefer-arrow-callback
196:34 warning Unexpected function expression prefer-arrow-callback
239:36 warning Unexpected function expression prefer-arrow-callback
291:86 warning Unexpected function expression prefer-arrow-callback
297:26 warning Unexpected function expression prefer-arrow-callback
317:43 warning Unexpected function expression prefer-arrow-callback
378:31 warning Don't make functions within a loop no-loop-func
477:31 warning Don't make functions within a loop no-loop-func
✖ 9 problems (0 errors, 9 warnings)
0 errors, 7 warnings potentially fixable with the `--fix` option.
ESLint found too many warnings (maximum: 0).
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! es2017-functions@ lint: `eslint --max-warnings=0 .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the es2017-functions@ lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/phongyewtong/.npm/_logs/2018-06-10T05_04_47_670Z-debug.log
Error: functions predeploy error: Command terminated with non-zero exit code1
我想我通过将警告增加到20来解决了这个问题 在你的控制台中输入这个
eslint --max-warnings=20
只需编辑functions文件夹中的
.eslintrc.json
文件(不可见,因此首先需要关闭“隐藏文件”)
// Warn against nested then() or catch() statements
"promise/no-nesting": **`0`**
// Severity should be one of the following: **`0`** = off, **`1`** = warn, **`2`** = error (you passed '20').
您是否尝试过修复代码以符合linting规则?看起来应该很琐碎