We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
jshint
1 parent cfa3152 commit 17d9985Copy full SHA for 17d9985
src/test/endpoint.test.js
@@ -105,11 +105,14 @@ function runEndpointGen(name, opt={}) {
105
106
let jshintCmd = path.join(TEST_DIR, '/fixtures/node_modules/.bin/jshint');
107
function jshint(_path, opt={}) {
108
- let {exclude, config} = opt;
109
- let cmd = `${jshintCmd} ${path.normalize(_path)}`;
110
- if(exclude) cmd += ` --exclude ${exclude}`;
111
- if(config) cmd += ` --config ${config}`;
112
- return runCmd(cmd);
+ _path = path.normalize(_path);
+ return fs.accessAsync(_path, fs.R_OK).then(err => {
+ let {config} = opt;
+ let cmd = `${jshintCmd} ${path.normalize(_path)}`;
+ if(config) cmd += ` --config ${config}`;
113
+ return runCmd(cmd);
114
+ });
115
+}
116
}
117
118
var config;
0 commit comments