chore: tidy

This commit is contained in:
cha0s 2023-12-02 06:34:53 -06:00
parent b852b564e8
commit b7731fb8ab
5 changed files with 2 additions and 11 deletions

View File

@ -15,7 +15,6 @@ export const hooks = {
}, },
'@flecks/core.webpack': (target, config) => { '@flecks/core.webpack': (target, config) => {
if ('web' === target) { if ('web' === target) {
// eslint-disable-next-line no-param-reassign
config.devServer.writeToDisk = true; config.devServer.writeToDisk = true;
} }
}, },

View File

@ -25,11 +25,11 @@ const normalizeDisplayName = (displayName) => (
displayName.startsWith('HotExported') ? displayName.slice(11) : displayName displayName.startsWith('HotExported') ? displayName.slice(11) : displayName
); );
const Organization = ({ function Organization({
label, label,
resourcePaths, resourcePaths,
uuid, uuid,
}) => { }) {
const dispatch = useDispatch(); const dispatch = useDispatch();
const current = useSelector(currentResourceSelector); const current = useSelector(currentResourceSelector);
const flecks = useFlecks(); const flecks = useFlecks();
@ -69,14 +69,12 @@ const Organization = ({
} }
else { else {
const next = createNextState(expanded, (draft) => { const next = createNextState(expanded, (draft) => {
/* eslint-disable no-param-reassign */
if (value in draft) { if (value in draft) {
delete draft[value]; delete draft[value];
} }
else { else {
draft[value] = true; draft[value] = true;
} }
/* eslint-enable no-param-reassign */
}); });
setExpanded(next); setExpanded(next);
} }

View File

@ -10,14 +10,12 @@ export const projectSelector = (state) => state.project;
const slice = createSlice({ const slice = createSlice({
name: 'persea/project', name: 'persea/project',
initialState: null, initialState: null,
/* eslint-disable no-param-reassign */
reducers: { reducers: {
setProject: (state, {payload}) => payload, setProject: (state, {payload}) => payload,
}, },
extraReducers: (builder) => { extraReducers: (builder) => {
builder.addCase(hydrateServer, (state, {payload}) => payload.req[HydrateServer]); builder.addCase(hydrateServer, (state, {payload}) => payload.req[HydrateServer]);
}, },
/* eslint-enable no-param-reassign */
}); });
slice.reducer.hydrateServer = async (req) => { slice.reducer.hydrateServer = async (req) => {

View File

@ -51,7 +51,6 @@ const slice = createSlice({
pending: {}, pending: {},
resources: {}, resources: {},
}, },
/* eslint-disable no-param-reassign */
extraReducers: (builder) => { extraReducers: (builder) => {
builder.addCase(hydrateServer, (state, action) => { builder.addCase(hydrateServer, (state, action) => {
const {req} = action.payload; const {req} = action.payload;
@ -89,7 +88,6 @@ const slice = createSlice({
// delete resources[`${project}${from}`]; // delete resources[`${project}${from}`];
// }, // },
}, },
/* eslint-enable no-param-reassign */
}); });
slice.reducer.hydrateServer = async (req) => { slice.reducer.hydrateServer = async (req) => {

View File

@ -22,7 +22,6 @@ const slice = createSlice({
current: null, current: null,
open: [], open: [],
}, },
/* eslint-disable no-param-reassign */
reducers: { reducers: {
closeResource: (state, {payload}) => { closeResource: (state, {payload}) => {
const index = state.open.findIndex(({uri}) => uri === payload); const index = state.open.findIndex(({uri}) => uri === payload);
@ -48,7 +47,6 @@ const slice = createSlice({
state.open = openResourcesSelector(payload); state.open = openResourcesSelector(payload);
}); });
}, },
/* eslint-enable no-param-reassign */
}); });
export const { export const {