Skip to content

Commit

Permalink
Disable no-dynamic-delete only in remove reducer
Browse files Browse the repository at this point in the history
  • Loading branch information
SBence committed Apr 22, 2024
1 parent a7aa8d4 commit 333efad
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ module.exports = {
"warn",
{ allowConstantExport: true },
],
"@typescript-eslint/no-dynamic-delete": "off",
"@typescript-eslint/no-misused-promises": [
"error",
{
Expand Down
1 change: 1 addition & 0 deletions src/store/slices/countersSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const countersSlice = createSlice({
state[uuidv4()] = DEFAULT_COUNTER;
},
remove: (state, action: PayloadAction<{ id: string }>) => {
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
delete state[action.payload.id];
},
setName: (state, action: PayloadAction<{ id: string; name: string }>) => {
Expand Down

0 comments on commit 333efad

Please sign in to comment.