-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add er spa #793
base: main
Are you sure you want to change the base?
feat: add er spa #793
Conversation
Coverage Report
File Coverage
|
} | ||
}); | ||
} else { | ||
return !!dependentValue[i] && !(dependentValue[i] === d?.expectedValue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid too many return
statements within this function.
} | ||
case "notOnlyBadValue": | ||
if (Array.isArray(dependentValue[i])) { | ||
return !( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid too many return
statements within this function.
); | ||
}; | ||
|
||
const triggerCheckSwitch = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function triggerCheckSwitch
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
]); | ||
let newValArr = [...value, ...dependency.effect.newValue]; | ||
|
||
if (dependency.effect.checkUnique) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identical blocks of code found in 2 locations. Consider refactoring.
]); | ||
let newValArr = [...value, dependency.effect.newValue]; | ||
|
||
if (dependency.effect.checkUnique) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identical blocks of code found in 2 locations. Consider refactoring.
Code Climate has analyzed commit d3d83a0 and detected 5 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 28.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 61.6% (-0.1% change). View more on Code Climate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I can see I don't see any issues, but I think I need another pair of eyes.
Purpose
Add ER Spa. Also added some new options to dependency wrapper and section styling as needed for the form. New options include checking for bad values as a condition, loose condition matching for checking if at least one condition matched, and section styling for the wrapper of the content.
Linked Issues to Close
ticket
Approach
New dependency conditions are a base approach checking if value included in either array or primitive. Section styling follows our normal styling approach of merging with our pre-defined styles. Form is massive, extracted as many repeatable sections as possible, but it's still a lot to go through.