mirror of
https://github.com/mermaid-js/mermaid.git
synced 2024-09-06 17:43:35 +02:00
fix more eslint issues
This commit is contained in:
parent
6c28c55ea7
commit
719ee2e001
2 changed files with 6 additions and 6 deletions
|
@ -136,7 +136,7 @@ function upsert(arr, key, newval) {
|
|||
function prettyPrintCommitHistory(commitArr) {
|
||||
var commit = _.maxBy(commitArr, 'seq');
|
||||
var line = '';
|
||||
_.each(commitArr, function(c, idx) {
|
||||
_.each(commitArr, function(c) {
|
||||
if (c == commit) {
|
||||
line += '\t*'
|
||||
} else {
|
||||
|
@ -147,7 +147,7 @@ function prettyPrintCommitHistory(commitArr) {
|
|||
_.each(branches, function(v,k){
|
||||
if (v == commit.id) label.push(k);
|
||||
});
|
||||
console.log.apply(console, label);
|
||||
log.debug(label);
|
||||
if (Array.isArray(commit.parent)) {
|
||||
//console.log("here", commit.parent);
|
||||
var newCommit = commits[commit.parent[0]];
|
||||
|
@ -157,8 +157,8 @@ function prettyPrintCommitHistory(commitArr) {
|
|||
} else if(commit.parent == null){
|
||||
return;
|
||||
} else {
|
||||
var newCommit = commits[commit.parent];
|
||||
upsert(commitArr, commit, newCommit);
|
||||
var nextCommit = commits[commit.parent];
|
||||
upsert(commitArr, commit, nextCommit);
|
||||
}
|
||||
commitArr = _.uniqBy(commitArr, 'id');
|
||||
prettyPrintCommitHistory(commitArr);
|
||||
|
@ -188,7 +188,7 @@ exports.getCommitsArray = function() {
|
|||
var commitArr = Object.keys(commits).map(function (key) {
|
||||
return commits[key];
|
||||
});
|
||||
_.each(commitArr, function(o) { console.log(o.id) });
|
||||
_.each(commitArr, function(o) { log.debug(o.id) });
|
||||
return _.orderBy(commitArr, ['seq'], ['desc']);
|
||||
}
|
||||
exports.getCurrentBranch = function() { return curBranch; }
|
||||
|
|
|
@ -47,7 +47,7 @@ describe('when parsing a gitGraph',function() {
|
|||
parser.parse(str);
|
||||
var commits = parser.yy.getCommits();
|
||||
//console.log(commits);
|
||||
console.log('options object', parser.yy.getOptions());
|
||||
//console.log('options object', parser.yy.getOptions());
|
||||
expect(parser.yy.getOptions()['key']).toBe('value');
|
||||
expect(Object.keys(commits).length).toBe(1);
|
||||
expect(parser.yy.getCurrentBranch()).toBe('master');
|
||||
|
|
Loading…
Reference in a new issue