node-snmp-native icon indicating copy to clipboard operation
node-snmp-native copied to clipboard

code check with eslint

Open Eden-Sun opened this issue 9 years ago • 7 comments

replace jshint with eslint which is more modern for js codebase.

Eden-Sun avatar Jan 18 '17 10:01 Eden-Sun

Hi. Thanks, I'm sure these are good fixes. However I'm not really fond of a single PR containing bugfixes, formatting changes and switching out the CI system. In fact, I'm not sure why we need to change CI at all?

calmh avatar Jan 18 '17 11:01 calmh

alright, i gonna separate them. I switch to circle-ci because travis seemed to be disabled on this repo.

Eden-Sun avatar Jan 19 '17 01:01 Eden-Sun

the travis failure here: SyntaxError: Use of const in strict mode.

is due to using nodejs 0.10. I am not objected to increasing the minimum required node version to 4.x (which apparently is the minimum version having enabled es6 also in strict mode) og 6.9.x even. However others may not have that luxury...

http://stackoverflow.com/questions/22603078/syntaxerror-use-of-const-in-strict-mode

bangert avatar Jan 20 '17 07:01 bangert

thats why i switch to circle-ci, only the module eslint need ES6 syntax which is a dev- dependency , so we can develop and run lint under node 4.x+ , and run only npm test under node 0.10. just like

machine:
  node:
    version: 4

test:
  override:
    - npm run lint && npm run test
    - nvm use 0.10; npm test 

here

Eden-Sun avatar Jan 20 '17 07:01 Eden-Sun

It will not increase the minimum node requirement since we can skip lint on lower version. The problem is that wether we should do a hint/lint on CI check. If yes, that is the solution. If not, it does not matter what hinter / linter to choose.

Eden-Sun avatar Jan 20 '17 08:01 Eden-Sun

Node 0.10 is simply what was the thing when I created that file, feel free to update as needed. Today I'd probably prefer circle before Travis as well, but either way works for me. Staying with Travis probably creates slightly less work for me, which is preferable from that standpoint.

calmh avatar Jan 20 '17 20:01 calmh

Lets increase the node version then...

bangert avatar Jan 24 '17 16:01 bangert