Skip to content

Commit

Permalink
Corrijo warnings de qa-control (0.1.3)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoefe committed May 10, 2016
1 parent 881d499 commit abb089a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
13 changes: 7 additions & 6 deletions dir-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
/*jshint eqnull:true */
/*jshint globalstrict:true */
/*jshint node:true */
/*eslint-disable no-console */

var dirInfo = {};

var Promises = require('best-promise');
var Path = require('path');
var fs = require('fs-promise');
var exec = require('child-process-promise').exec;
var readYaml = require('read-yaml-promise');
var winOS = Path.sep==='\\';
//var winOS = Path.sep==='\\';
var ncu = require('npm-check-updates');

dirInfo.config = { gitDir:false };
Expand Down Expand Up @@ -40,7 +41,7 @@ dirInfo.gitPath = function gitPath() {
function gitRegExpTo(cual) {
// es posible que siempre sea https y sobre el '?', pero esto asegura
return new RegExp('^((https?://)?[^.]+'+cual+'\.com)');
};
}

dirInfo.getInfo = function getInfo(path, opts){
opts = opts || {};
Expand All @@ -61,7 +62,7 @@ dirInfo.getInfo = function getInfo(path, opts){
gitDir = path+Path.sep+".git";
return fs.stat(gitDir).then(function(statDotGit){
return statDotGit.isDirectory();
}).catch(function(err){
}).catch(function(/*err*/){
return false;
}).then(function(isDirDotGit) {
if(isDirDotGit){
Expand Down Expand Up @@ -144,7 +145,7 @@ dirInfo.getInfo = function getInfo(path, opts){
}
}
if(opts.net && (info.isGithub || info.isGitlab)) {
return exec('git remote show origin', execOptions).catch(function(err) {
return exec('git remote show origin', execOptions).catch(function(/*err*/) {
return {errorInExec:true};
}).then(function(resRemote) {
if(!resRemote.errorInExec) {
Expand Down Expand Up @@ -186,7 +187,7 @@ dirInfo.getInfo = function getInfo(path, opts){
info.isJson = true;
}
if(info.isJson && opts.cmd) {
return fs.readJson(path).catch(function(err) {
return fs.readJson(path).catch(function(/*err*/) {
info.hasError = true;
return {errorInRJS:true};
}).then(function(json) {
Expand Down
13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@
"run-in": "server",
"test-appveyor": true
},
"eslintConfig":{
"env": {
"node": false
},
"rules": {
"strict": 0,
"no-console": 1,
"no-unused-vars": 1
},
"parserOptions": {
"ecmaVersion": 6
}
},
"qa-control": {
"package-version": "0.1.3",
"run-in": "server",
Expand Down
2 changes: 1 addition & 1 deletion preinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var pout=process.stdout, perr=process.stderr;
var logtag = "DIR-INFO: ";

pout.write(logtag+"Checking prerequisites...\n");
exec("git version", function(err, stdout, stderr) {
exec("git version", function(err, stdout/* ,stderr */) {
if(err) {
perr.write(logtag+"Error! git not found in PATH\n");
//perr.write(logtag+"Error finding git: "+err+"\n");
Expand Down

0 comments on commit abb089a

Please sign in to comment.