Closed mharris717 closed 8 years ago
Don't know if you want "all" to be what you pass.
I thought about doing all when no name is provided but didn't love that.
If you'd like I'd be happy to add functionality to run jshint in the function for your current dir if no name is provided. Just let me know.
@mharris717 Thanx for the effort!
Ideally it should behave similar to the existing function deploy
and endpoint deploy
actions. This means taking all functions within the current working dir by default and passing an --all
/ -a
flag for all functions.
You can see how this works here: https://github.com/serverless/serverless/blob/master/lib/actions/FunctionDeploy.js#L56 https://github.com/serverless/serverless/blob/master/lib/actions/FunctionDeploy.js#L193
If you can change/implement this, I would be happy to merge!
Gotcha, new to serverless. Will take a crack if I have time. Thanks for the reply :)
On Saturday, April 2, 2016, Joost Farla notifications@github.com wrote:
@mharris717 https://github.com/mharris717 Thanx for the effort!
Ideally it should behave similar to the existing function deploy and endpoint deploy actions. This means taking all functions within the current working dir by default and passing an --all / -a flag for all functions.
You can see how this works here:
https://github.com/serverless/serverless/blob/master/lib/actions/FunctionDeploy.js#L56
https://github.com/serverless/serverless/blob/master/lib/actions/FunctionDeploy.js#L193
If you can change/implement this, I would be happy to merge!
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/joostfarla/serverless-jshint-plugin/pull/3#issuecomment-204665758
Mike Harris mharris717@gmail.com (201)650-5579
Force pushed a squashed new attempt.
It still has the error if you end up with no functions to lint. Let me know if you want that out.
Not sure if it matches your style. Happy to make changes.
And I believe the change on line 111 of the test file is inadvertent, I'll fix if you want to merge.
@mharris717 Awesome! This will be released soon!
The way I did it in _validateAndPrepare is a bit cheesy but not terrible I think. I'm not a node expert, hope I didn't do anything dumb.