leopardslab / nodecloud-legacy

[DEPERECATED] REFER: nodecloud | The Node.js API for open cloud
Apache License 2.0
55 stars 101 forks source link

add lint npm script #24

Closed nicolasraube closed 6 years ago

nicolasraube commented 6 years ago

What did you implement:

Closes #23

How did you implement it:

add new script in package.json

How can we verify it:

Until now, the only line added is: "lint": "eslint lib; eslint test; exit 0" exit 0 tells npm that everything is ok even if there are lint errors.

If you now run npm run lint, it will lint /lib and /test. The person who runs the command should be able to choose the linted directories / files. This still has to be implemented.

Todos:

Is this ready for review?: NO Is it a breaking change?: NO

nicolasraube commented 6 years ago

The only possibility I see for arguments is npm run lint -- lib test but then exit 0 doesn't work anymore and npm says linting failed because the exit status is 1. Any suggestions?

nicolasraube commented 6 years ago

@agentmilindu Changed it. I still get this error after linting. captura de pantalla de 2017-12-24 10-42-53 I found this issue https://github.com/eslint/eslint/issues/2409 but they can only suggest exit 0. Ugly but I guess we have to live with it.

agentmilindu commented 6 years ago

@nicolasraube The linting fails because there are linting errors, and this is the expected behaviour. Anyway, good job!