feat: add pre-commit hooks & refactor code to pass linting

This commit is contained in:
Jordan Knott
2020-08-20 18:11:24 -05:00
parent abf9e1328a
commit 9dba566660
49 changed files with 297 additions and 462 deletions

View File

@ -16,4 +16,3 @@ export default {
export const Default = () => {
return <AddList onSave={action('on save')} />;
};

View File

@ -32,4 +32,3 @@ export const AddCardButton = styled(Button)`
padding: 6px 12px;
border-radius: 3px;
`;

View File

@ -190,10 +190,14 @@ const TaskDetails: React.FC<TaskDetailsProps> = ({
const handleDeleteTask = () => {
onDeleteTask(task);
};
const $title = useRef<HTMLTextAreaElement>(null);
const onKeyDown = (e: React.KeyboardEvent) => {
if (e.key === 'Enter') {
e.preventDefault();
onTaskNameChange(task, taskName);
if ($title && $title.current) {
$title.current.blur();
}
}
};
const $unassignedRef = useRef<HTMLDivElement>(null);
@ -300,6 +304,7 @@ const TaskDetails: React.FC<TaskDetailsProps> = ({
<TaskHeader>
<TaskDetailsTitleWrapper>
<TaskDetailsTitle
ref={$title}
value={taskName}
onChange={(e: React.ChangeEvent<HTMLTextAreaElement>) => setTaskName(e.currentTarget.value)}
onKeyDown={onKeyDown}

View File

@ -4124,4 +4124,4 @@ export function useUsersLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOp
}
export type UsersQueryHookResult = ReturnType<typeof useUsersQuery>;
export type UsersLazyQueryHookResult = ReturnType<typeof useUsersLazyQuery>;
export type UsersQueryResult = ApolloReactCommon.QueryResult<UsersQuery, UsersQueryVariables>;
export type UsersQueryResult = ApolloReactCommon.QueryResult<UsersQuery, UsersQueryVariables>;

View File

@ -26,4 +26,3 @@ mutation toggleTaskLabel($taskID: UUID!, $projectLabelID: UUID!) {
}
}
}

View File

@ -9,4 +9,3 @@ mutation updateTaskDueDate($taskID: UUID!, $dueDate: Time) {
dueDate
}
}

View File

@ -35,4 +35,3 @@ query users {
}
}
}

View File

@ -24,4 +24,3 @@ AngleDown.defaultProps = {
};
export default AngleDown;

View File

@ -24,4 +24,3 @@ ArrowLeft.defaultProps = {
};
export default ArrowLeft;

View File

@ -33,4 +33,3 @@ Star.defaultProps = {
};
export default Star;