exceljs / exceljs

Excel Workbook Manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] npm run lint reports multiple violations

iva2k opened this issue Β· comments

πŸ› Bug Report

Lib version: git clone https://github.com/exceljs/exceljs.git as of 2021-0128

lint reports multiple violations

> exceljs@4.2.0 lint C:\dev\exceljs.exceljs
> eslint --format node_modules/eslint-friendly-formatter .
...
(details clipped, see comment below)

Errors:
  24  http://eslint.org/docs/rules/no-mixed-operators
   9  http://eslint.org/docs/rules/no-underscore-dangle
   5  http://eslint.org/docs/rules/max-len
   2  http://eslint.org/docs/rules/semi
   2  http://eslint.org/docs/rules/quotes
   2  http://eslint.org/docs/rules/prefer-const
   2  http://eslint.org/docs/rules/no-await-in-loop
   1  http://eslint.org/docs/rules/no-restricted-globals
   1  http://eslint.org/docs/rules/no-trailing-spaces
   1  https://google.com/#q=import%2Fno-unresolved
   1  https://google.com/#q=node%2Fno-missing-require
   1  https://google.com/#q=import%2Fno-extraneous-dependencies
   1  https://google.com/#q=node%2Fno-extraneous-require

Warnings:
  1  http://eslint.org/docs/rules/prefer-destructuring

Steps To Reproduce

git clone https://github.com/exceljs/exceljs.git
cd exceljs
npm i
npm lint

The expected behaviour:

PASS

Possible solution (optional, but very helpful):

Here's detailed list of lint violations:

  ⚠  http://eslint.org/docs/rules/prefer-destructuring          Use object destructuring                                                                                                   
  spec\unit\doc\worksheet.merge.spec.js:238:17

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '+' and '/'                                                                                              
  lib\doc\anchor.js:41:27

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '+' and '/'                                                                                              
  lib\doc\anchor.js:41:76

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '+' and '/'                                                                                              
  lib\doc\anchor.js:50:27

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '+' and '/'                                                                                              
  lib\doc\anchor.js:50:77

  ✘  http://eslint.org/docs/rules/no-underscore-dangle          Unexpected dangling '_' in '_value'                                                                                        
  lib\doc\worksheet.js:477:17

  ✘  http://eslint.org/docs/rules/no-underscore-dangle          Unexpected dangling '_' in '_number'                                                                                       
  lib\doc\worksheet.js:478:50

  ✘  http://eslint.org/docs/rules/no-underscore-dangle          Unexpected dangling '_' in '_row'                                                                                          
  lib\doc\worksheet.js:478:50

  ✘  http://eslint.org/docs/rules/no-underscore-dangle          Unexpected dangling '_' in '_master'                                                                                       
  lib\doc\worksheet.js:479:34

  ✘  http://eslint.org/docs/rules/no-underscore-dangle          Unexpected dangling '_' in '_value'                                                                                        
  lib\doc\worksheet.js:479:34

  ✘  http://eslint.org/docs/rules/no-underscore-dangle          Unexpected dangling '_' in '_number'                                                                                       
  lib\doc\worksheet.js:481:25

  ✘  http://eslint.org/docs/rules/no-underscore-dangle          Unexpected dangling '_' in '_row'                                                                                          
  lib\doc\worksheet.js:481:25

  ✘  http://eslint.org/docs/rules/no-underscore-dangle          Unexpected dangling '_' in '_number'                                                                                       
  lib\doc\worksheet.js:482:26

  ✘  http://eslint.org/docs/rules/no-underscore-dangle          Unexpected dangling '_' in '_column'                                                                                       
  lib\doc\worksheet.js:482:26

  ✘  http://eslint.org/docs/rules/semi                          Missing semicolon                                                                                                          
  lib\doc\worksheet.js:482:53

  ✘  http://eslint.org/docs/rules/max-len                       This line has a length of 110. Maximum allowed is 100                                                                      
  lib\stream\xlsx\worksheet-writer.js:495:1

  ✘  http://eslint.org/docs/rules/no-restricted-globals         Unexpected use of 'isFinite'. Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite  
  lib\stream\xlsx\worksheet-writer.js:495:29

  ✘  http://eslint.org/docs/rules/quotes                        Strings must use singlequote                                                                                               
  lib\utils\under-dash.js:102:14

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '+' and '/'                                                                                              
  lib\utils\utils.js:56:18

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '+' and '/'                                                                                              
  lib\utils\utils.js:56:32

  ✘  http://eslint.org/docs/rules/max-len                       This line has a length of 101. Maximum allowed is 100                                                                      
  lib\xlsx\xform\sheet\cell-xform.js:111:1

  ✘  http://eslint.org/docs/rules/max-len                       This line has a length of 114. Maximum allowed is 100                                                                      
  lib\xlsx\xform\sheet\cf\cf-rule-xform.js:50:1

  ✘  http://eslint.org/docs/rules/max-len                       This line has a length of 115. Maximum allowed is 100                                                                      
  lib\xlsx\xform\sheet\cf\cf-rule-xform.js:52:1

  ✘  http://eslint.org/docs/rules/max-len                       This line has a length of 117. Maximum allowed is 100                                                                      
  lib\xlsx\xform\sheet\cf\cf-rule-xform.js:54:1

  ✘  http://eslint.org/docs/rules/prefer-const                  'cellVals' is never reassigned. Use 'const' instead                                                                        
  spec\unit\doc\worksheet.merge.spec.js:228:11

  ✘  http://eslint.org/docs/rules/prefer-const                  'cellVal' is never reassigned. Use 'const' instead                                                                         
  spec\unit\doc\worksheet.merge.spec.js:237:16

  ✘  http://eslint.org/docs/rules/no-trailing-spaces            Trailing spaces not allowed                                                                                                
  spec\unit\doc\worksheet.merge.spec.js:238:49

  ✘  http://eslint.org/docs/rules/quotes                        Strings must use singlequote                                                                                               
  spec\unit\doc\worksheet.merge.spec.js:240:65

  ✘  http://eslint.org/docs/rules/semi                          Missing semicolon                                                                                                          
  spec\unit\doc\worksheet.merge.spec.js:246:7

  ✘  https://google.com/#q=import%2Fno-unresolved               Unable to resolve path to module '../../dist/es5'                                                                          
  spec\utils\verquire.js:16:28

  ✘  https://google.com/#q=node%2Fno-missing-require            "../../dist/es5" is not found                                                                                              
  spec\utils\verquire.js:16:28

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '+' and '/'                                                                                              
  test\regression\utils\hr-stopwatch.js:31:35

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '+' and '/'                                                                                              
  test\regression\utils\hr-stopwatch.js:31:53

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '+' and '/'                                                                                              
  test\regression\utils\hr-stopwatch.js:32:29

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '+' and '/'                                                                                              
  test\regression\utils\hr-stopwatch.js:32:40

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '-' and '*'                                                                                              
  test\test-cf.js:42:21

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '-' and '*'                                                                                              
  test\test-cf.js:42:41

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '-' and '*'                                                                                              
  test\test-cf.js:43:19

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '-' and '*'                                                                                              
  test\test-cf.js:43:24

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '+' and '*'                                                                                              
  test\test-chart.js:15:31

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '+' and '*'                                                                                              
  test\test-chart.js:15:42

  ✘  http://eslint.org/docs/rules/no-await-in-loop              Unexpected `await` inside a loop                                                                                           
  test\test-protection-spinCount.js:44:5

  ✘  http://eslint.org/docs/rules/no-await-in-loop              Unexpected `await` inside a loop                                                                                           
  test\test-protection-spinCount.js:50:5

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '+' and '*'                                                                                              
  test\test-table.js:57:49

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '+' and '*'                                                                                              
  test\test-table.js:57:57

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '+' and '*'                                                                                              
  test\testBigBookOut.js:99:26

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '+' and '*'                                                                                              
  test\testBigBookOut.js:99:35

  ✘  https://google.com/#q=import%2Fno-extraneous-dependencies  'sax' should be listed in the project's dependencies. Run 'npm i -S sax' to add it                                         
  test\testSax2.js:2:21

  ✘  https://google.com/#q=node%2Fno-extraneous-require         "sax" is extraneous                                                                                                        
  test\testSax2.js:2:21

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '+' and '/'                                                                                              
  test\utils\hr-stopwatch.js:31:35

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '+' and '/'                                                                                              
  test\utils\hr-stopwatch.js:31:53

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '+' and '/'                                                                                              
  test\utils\hr-stopwatch.js:32:29

  ✘  http://eslint.org/docs/rules/no-mixed-operators            Unexpected mix of '+' and '/'                                                                                              
  test\utils\hr-stopwatch.js:32:40

✘ 53 problems (52 errors, 1 warning)