frontend/reducers/userEnvironmentVariables.js
Function userEnvironmentVariables
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Wontfix
Wontfix
export default function userEnvironmentVariables(state = initialState, action) {
switch (action.type) {
case HTTP_ERROR: {
const { siteId } = action.payload || {};
return {
Avoid too many return
statements within this function. Wontfix
Wontfix
return {
...state,
[siteId]: {
isLoading: false,
data: state[siteId].data.filter(uev => uev.id !== uevId),