styles: format code

This commit is contained in:
EnixCoda 2020-04-30 22:21:04 +08:00
parent 18cf30b7ab
commit 69506957df
No known key found for this signature in database
GPG key ID: 0C1A07377913A1DD
3 changed files with 5 additions and 5 deletions

View file

@ -60,7 +60,7 @@ export function raiseError(error: Error, extra?: any) {
export const withErrorLog: Middleware = function withErrorLog(method, args) {
return [
async function(...args: any[]) {
async function (...args: any[]) {
try {
await method.apply(null, args)
} catch (error) {

View file

@ -114,6 +114,6 @@ export function connect<BaseP, ExtraP>(mapping: Sources<BaseP, ExtraP>) {
export type GetCreatedMethod<MC> = MC extends MethodCreator<infer P, infer S, infer Args>
? Args extends any[]
? ((...args: Args) => void)
? (...args: Args) => void
: never
: never

View file

@ -18,8 +18,8 @@ function parseTreeData(treeData: GiteeAPI.TreeData, metaData: MetaData) {
const root: TreeNode = { name: '', path: '', contents: [], type: 'tree' }
pathToNode.set('', root)
tree.forEach((item) => pathToItem.set(item.path, item))
tree.forEach((item) => {
tree.forEach(item => pathToItem.set(item.path, item))
tree.forEach(item => {
// bottom-up search for the deepest node created
let path = item.path
const itemsToCreateTreeNode: GiteeAPI.TreeItem[] = []
@ -110,7 +110,7 @@ export const Gitee: Platform = {
const treeData = await API.getTreeData(userName, repoName, branchName)
const root = parseTreeData(treeData, metaData)
const gitModules = root.contents?.find((item) => item.name === '.gitmodules')
const gitModules = root.contents?.find(item => item.name === '.gitmodules')
if (gitModules) {
if (metaData.userName && metaData.repoName && gitModules.sha) {
const blobData = await API.getBlobData(