chore: eslint add sonar (#17989)
This commit is contained in:
parent
8f9cbe1c49
commit
d80f4c7d3b
38 changed files with 157 additions and 180 deletions
|
|
@ -1,37 +0,0 @@
|
|||
import graphToLogStruct from '../graph-to-log-struct'
|
||||
|
||||
describe('parallel', () => {
|
||||
const list = graphToLogStruct('(parallel, parallelNode, nodeA, nodeB -> nodeC)')
|
||||
const [parallelNode, ...parallelDetail] = list
|
||||
const parallelI18n = 'PARALLEL'
|
||||
// format will change the list...
|
||||
// const result = format(cloneDeep(list) as any, () => parallelI18n)
|
||||
|
||||
test('parallel should put nodes in details', () => {
|
||||
// expect(result as any).toEqual([
|
||||
// {
|
||||
// ...parallelNode,
|
||||
// parallelDetail: {
|
||||
// isParallelStartNode: true,
|
||||
// parallelTitle: `${parallelI18n}-1`,
|
||||
// children: [
|
||||
// parallelNode,
|
||||
// {
|
||||
// ...parallelDetail[0],
|
||||
// parallelDetail: {
|
||||
// branchTitle: `${parallelI18n}-1-A`,
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// ...parallelDetail[1],
|
||||
// parallelDetail: {
|
||||
// branchTitle: `${parallelI18n}-1-B`,
|
||||
// },
|
||||
// },
|
||||
// parallelDetail[2],
|
||||
// ],
|
||||
// },
|
||||
// },
|
||||
// ])
|
||||
})
|
||||
})
|
||||
|
|
@ -148,6 +148,7 @@ const format = (list: NodeTracing[], t: any, isPrint?: boolean): NodeTracing[] =
|
|||
return false
|
||||
|
||||
const isParallelStartNode = node.parallelDetail?.isParallelStartNode
|
||||
// eslint-disable-next-line sonarjs/prefer-single-boolean-return
|
||||
if (!isParallelStartNode)
|
||||
return false
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue