Javascript uncommon errors I get from my nodejs index.js

I don't understand how am getting this errors from running a javascript index.js file, my project is a firebase functions and this is errors come from the nodejs index.js script, I use visual studio as ide.

   3:1   error  Expected space or tab after '//' in comment           spaced-comment
   4:1   error  Expected space or tab after '//' in comment           spaced-comment
  13:1   error  This line has a length of 126. Maximum allowed is 80  max-len
  13:89  error  Missing semicolon                                     semi
  17:16  error  Strings must use doublequote                          quotes
  17:68  error  Missing trailing comma                                comma-dangle
  21:1   error  Missing JSDoc comment                                 require-jsdoc
  21:18  error  Missing space before opening brace                    space-before-blocks
  22:1   error  Expected indentation of 2 spaces but found 4          indent
  26:1   error  Expected indentation of 2 spaces but found 4          indent
  26:5   error  Unexpected var, use let or const instead              no-var
  26:17  error  Multiple spaces found before 'req'                    no-multi-spaces
  27:1   error  Expected indentation of 2 spaces but found 4          indent
  27:5   error  Unexpected var, use let or const instead              no-var
  28:1   error  Expected indentation of 2 spaces but found 4          indent
  28:5   error  Expected space(s) after "if"                          keyword-spacing
  28:14  error  Missing space before opening brace                    space-before-blocks
  29:1   error  Expected indentation of 4 spaces but found 8          indent
  29:28  error  Trailing spaces not allowed                           no-trailing-spaces
  30:1   error  Expected indentation of 2 spaces but found 4          indent
  31:4   error  Newline required at end of file but not found         eol-last

✖ 21 problems (21 errors, 0 warnings)
  19 errors and 0 warnings potentially fixable with the `--fix` option.


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! functions@ lint: `eslint .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the 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!     C:\Users\chris\AppData\Roaming\npm-cache\_logs\2021-06-07T04_32_11_868Z-debug.log
events.js:288
      throw er; // Unhandled 'error' event

Upvotes: 0

Views: 487

Answers (1)

Haris Wilson
Haris Wilson

Reputation: 166

Change "lint": "eslint ." to "lint": "eslint" in the file package.json inside functions folder of your project

Upvotes: 5

Related Questions