Add linter and minor bug fixes (#107)

This commit is contained in:
Simon Lecoq
2021-02-05 23:45:48 +01:00
committed by GitHub
parent 61e2f6e1a1
commit 882a93dea5
74 changed files with 1544 additions and 712 deletions

View File

@@ -1,19 +1,19 @@
/** Mocked data */
export default function ({faker, query, login = faker.internet.userName()}) {
console.debug(`metrics/compute/mocks > mocking graphql api result > gists/default`)
/**Mocked data */
export default function({faker, query, login = faker.internet.userName()}) {
console.debug("metrics/compute/mocks > mocking graphql api result > gists/default")
return /after: "MOCKED_CURSOR"/m.test(query) ? ({
user:{
gists:{
edges:[],
nodes:[],
}
}
},
},
}) : ({
user:{
gists:{
edges:[
{
cursor:"MOCKED_CURSOR"
cursor:"MOCKED_CURSOR",
},
],
totalCount:faker.random.number(100),
@@ -23,17 +23,17 @@
isFork:false,
forks:{totalCount:faker.random.number(10)},
files:[{name:faker.system.fileName()}],
comments:{totalCount:faker.random.number(10)}
comments:{totalCount:faker.random.number(10)},
},
{
stargazerCount:faker.random.number(10),
isFork:false,
forks:{totalCount:faker.random.number(10)},
files:[{name:faker.system.fileName()}],
comments:{totalCount:faker.random.number(10)}
}
]
}
}
comments:{totalCount:faker.random.number(10)},
},
],
},
},
})
}
}