chore: enhance eslint rules (#6476)

* chore: enhance eslint rules

* chore: enhance eslint rules
This commit is contained in:
三咲智子
2022-03-08 14:03:32 +08:00
committed by GitHub
parent 88a97ca6d2
commit b8c38a9fe5
162 changed files with 861 additions and 625 deletions

View File

@ -20,18 +20,20 @@ const createData = (
key = 'node'
): Tree[] => {
let id = 0
return new Array(minNodesNumber).fill(deep).map(() => {
const childrenNumber =
deep === maxDeep ? 0 : Math.round(Math.random() * maxChildren)
const nodeKey = getKey(key, ++id)
return {
id: nodeKey,
label: nodeKey,
children: childrenNumber
? createData(maxDeep, maxChildren, childrenNumber, deep + 1, nodeKey)
: undefined,
}
})
return Array.from({ length: minNodesNumber })
.fill(deep)
.map(() => {
const childrenNumber =
deep === maxDeep ? 0 : Math.round(Math.random() * maxChildren)
const nodeKey = getKey(key, ++id)
return {
id: nodeKey,
label: nodeKey,
children: childrenNumber
? createData(maxDeep, maxChildren, childrenNumber, deep + 1, nodeKey)
: undefined,
}
})
}
const props = {