Closed jussi-kalliokoski closed 10 years ago
You can already do this, no need for a patch. Just do like this:
plato: {
report: {
options: {
jshint: {
options: {
jshintrc: '.jshintrc'
}
}
}
},
}
As a added bonus you can have comments in your .jshintrc
file.
I'd like the .jshintrc
file(s) to be found relative to what is being linted in the same way that jshint does:
In case of .jshintrc, JSHint will look for this file in the current working directory and, if not found, will move one level up the directory tree all the way up to the filesystem root.
The config object used in grunt-contrib-jshint makes a lot of sense. And I love being able to let directory structure decided which .jshintrc to lint against. Please replicate this in grunt-plato!
For kicks, i tried using the grunt-contrib-jshint style jshintrc: true
. The grunt plato task completed just fine, but the lint reports all started with:
"Bad option: 'jshintrc'."
It still is not picking up the file. Getting "Bad option: 'jshintrc'."
is anybody working on this issue ? or any update ?
Not currently, no. Any effort there is time to spend is being put toward work on plato v2. A pull request addressing this would be accepted, though.
It would be great to have the possibility to define an external
.jshintrc
file instead of having to load the file manually. Currently you have to manually load the file so it always gets loaded when you load the Gruntfile regardless of whether you run plato or not.My use case is that I have a project where a build server builds the code, runs jshint, tests, coverage, plato, etc. then deploys the "compiled code" +
Gruntfile.js
(for running the tasks necessary there) on another node. The deployed package doesn't include the.jshintrc
and nor should it since it doesn't run jshint at any point.