Skip to content

Commit

Permalink
fix: lint fixes via lint:fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nmccready committed Jun 26, 2019
1 parent 3554f79 commit 7ce8e4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/useList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const useList = <T>(initialList: T[] = []): [T[], Actions<T>] => {
{
set,
clear: () => set([]),
updateAt: (index, entry) => set(currentList => [...currentList.slice(0, index), entry, ...currentList.slice(index + 1)]),
updateAt: (index, entry) =>
set(currentList => [...currentList.slice(0, index), entry, ...currentList.slice(index + 1)]),
remove: index => set(currentList => [...currentList.slice(0, index), ...currentList.slice(index + 1)]),
push: entry => set(currentList => [...currentList, entry]),
filter: fn => set(currentList => currentList.filter(fn)),
Expand Down
2 changes: 1 addition & 1 deletion src/useMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const useMap = <T extends object = any>(initialMap: T = {} as T): [T, Actions<T>
{
get: (key: keyof T) => map[key as string],
set: <K extends keyof T>(key: K, entry: T[K]) => {
set((prevMap)=>({
set(prevMap => ({
...prevMap,
[key]: entry,
}));
Expand Down

0 comments on commit 7ce8e4f

Please sign in to comment.