Increased scope of lint check, removed some issues

This commit is contained in:
knsv
2014-12-13 20:58:53 +01:00
parent 48af3b3590
commit 7fc2a0a544
4 changed files with 9 additions and 13 deletions

View File

@@ -14,7 +14,7 @@ var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
var paths = {
scripts: ['./src/*.js']
scripts: ['./src/**/*.js', '!**/parser/*.js']
};
gulp.task('jison2', function() {
@@ -40,7 +40,7 @@ gulp.task('dist', ['slimDist', 'fullDist','jasmine']);
var jasmine = require('gulp-jasmine');
gulp.task('jasmine',['jison'], function () {
gulp.task('jasmine',['jison','lint'], function () {
return gulp.src(['src/**/*.spec.js'])
.pipe(jasmine({includeStackTrace:true}));
});

View File

@@ -4,8 +4,6 @@
var graph = require('./graphDb');
var flow = require('./parser/flow');
var dot = require('./parser/dot');
var utils = require('../../utils');
var he = require('he');
var dagreD3 = require('dagre-d3');
/**
* Function that adds the vertices found in the graph definition to the graph to be rendered.
@@ -207,7 +205,7 @@ exports.draw = function (text, id,isDot) {
{x: s / 2, y: -s},
{x: 0, y: -s / 2}
];
shapeSvg = parent.insert("polygon", ":first-child")
var shapeSvg = parent.insert("polygon", ":first-child")
.attr("points", points.map(function (d) {
return d.x + "," + d.y;
}).join(" "))
@@ -233,7 +231,7 @@ exports.draw = function (text, id,isDot) {
{x: -h/2, y: -h},
{x: 0, y: -h/2},
];
shapeSvg = parent.insert("polygon", ":first-child")
var shapeSvg = parent.insert("polygon", ":first-child")
.attr("points", points.map(function (d) {
return d.x + "," + d.y;
}).join(" "))
@@ -271,8 +269,6 @@ exports.draw = function (text, id,isDot) {
render(d3.select("#" + id + " g"), g);
// Center the graph
var xCenterOffset = (svg.attr("width") - g.graph().width) / 2;
//svgGroup.attr("transform", "translate(" + xCenterOffset + ", 20)");
svg.attr("height", g.graph().height );
svg.attr("width", g.graph().width );
};

View File

@@ -129,7 +129,7 @@ exports.setClickEvent = function (id,functionName) {
var elem = document.getElementById(id2);
if (elem !== null) {
elem.onclick = function () {
eval(functionName + '(\'' + id2 + '\')');
eval(functionName + '(\'' + id2 + '\')'); // jshint ignore:line
};
}
});
@@ -142,7 +142,7 @@ exports.setClickEvent = function (id,functionName) {
var elem = document.getElementById(id);
if(elem !== null){
//console.log('id was NOT null: '+id);
elem.onclick = function(){eval(functionName+'(\'' + id + '\')');};
elem.onclick = function(){eval(functionName+'(\'' + id + '\')');}; // jshint ignore:line
}
else{
//console.log('id was null: '+id);

File diff suppressed because one or more lines are too long