4

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 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
Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
phongyewtong
  • 5,085
  • 13
  • 56
  • 81

2 Answers2

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').
NAVIN
  • 3,193
  • 4
  • 19
  • 32
ali kinaze
  • 11
  • 1
0

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

Type this in your console.

eslint --max-warnings=20
phongyewtong
  • 5,085
  • 13
  • 56
  • 81