dwyl / learn-travis

:sunglasses: A quick Travis CI (Continuous Integration) Tutorial for Node.js developers
MIT License
1.25k stars 352 forks source link

jshint configuration needs refresh? #33

Closed gsilvapt closed 6 years ago

gsilvapt commented 6 years ago

Hello all!

I was going through your tutorials to add jshint to my travis build in a node package sandbox I am creating and noticed there is something that may be outdated in your documentation/readme file.

Under define the test, your test scripts recommend ./node_modules/jshint/bin/jshint hello.js but I was only able to run jshint in my project if I set this script section simply to jshint lib/app.js. I couldn't find any other reference online to this issue so this either is related to my configurations (I'm new to this) or jshint has changed and is "smarter" in these days.

The problem was that npm test would always return the following error:

> ./node-modules/jshint/bin/jshint lib/app.js                                   

sh: 1: ./node-modules/jshint/bin/jshint: not found  

Tried removing, installing again, deleting package.json and node_modules, running npm init again to get everything fresh and kept going until I simply changed to 'jshint lib/app.js`. This, locally. never tested with Travis but when I pushed it didn't complain.

Can you confirm if this something you need to update or is something just related to my build? Would love to hear why this happened and what caused so I learn from this.

PS: It is working as expected because it returned a few semi-colons missing throughout the project.

nelsonic commented 6 years ago

@gsilvapt thanks very much for taking the time to open this issue! We agree that the config could do with a refresh. You have write access to the repo (once you accept the invitation to join @dwyl ...) so you can create a Pull Request and someone will review/merge. Thanks!

gsilvapt commented 6 years ago

@nelsonic thanks for your reply! Do you prefer that way? The common approach is fork, push and do PR. But I can do that, no problem :+1:

iteles commented 6 years ago

@gsilvapt Both work - either fork, push, PR or seeing as you have write access, new branch, push, PR.

It's much of a muchness but we like to recognise that you've made a contribution by providing you with write access :blush: This way you can also use the labels and assign things as per https://github.com/dwyl/contributing

nelsonic commented 6 years ago

Fixed by https://github.com/dwyl/learn-travis/pull/34 thanks again @gsilvapt