admin管理员组

文章数量:1419233

i am not sure what is preventing me to deploy on firebase Its prevent me from deploying to firebase function.

firebase deploy --only functions

Can anyone help me to see what is the problem

  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 plete 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

i am not sure what is preventing me to deploy on firebase Its prevent me from deploying to firebase function.

firebase deploy --only functions

Can anyone help me to see what is the problem

  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 plete 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
Share Improve this question edited Jun 10, 2018 at 13:22 Doug Stevenson 319k36 gold badges456 silver badges473 bronze badges asked Jun 10, 2018 at 5:08 phongyewtongphongyewtong 5,31915 gold badges59 silver badges87 bronze badges 1
  • 10 Have you tried fixing your code to be pliant with the linting rules? Looks like it should be trivial – CertainPerformance Commented Jun 10, 2018 at 5:20
Add a ment  | 

2 Answers 2

Reset to default 1

Just edit the .eslintrc.json file (invisible, thus first need to turnoff 'hide files') within the functions folder.

// 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').

I think i fixed it by increasing the warning to 20.

Type this in your console.

eslint --max-warnings=20

本文标签: javascriptESLint found too many warnings (maximum 0) and i cant deploy on firebase functionStack Overflow