Skip to content

Commit

Permalink
🎨 fix all lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tktcorporation committed Oct 10, 2022
1 parent 757e2d9 commit 068cc74
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 20 deletions.
2 changes: 1 addition & 1 deletion api/src/functions/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const handler = async (event, context) => {
//
// If this returns anything else, it will be returned by the
// `signUp()` function in the form of: `{ message: 'String here' }`.
handler: ({ username, hashedPassword, salt, userAttributes }) => {
handler: ({ username, hashedPassword, salt, _userAttributes }) => {
return db.user.create({
data: {
email: username,
Expand Down
6 changes: 0 additions & 6 deletions api/src/services/comments/comments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ export const comments: QueryResolvers['comments'] = ({
})
}

export const comment: QueryResolvers['comment'] = ({ id }) => {
return db.comment.findUnique({
where: { id },
})
}

export const Comment: CommentRelationResolvers = {
post: (_obj, { root }) => {
return db.comment.findUnique({ where: { id: root?.id } }).post()
Expand Down
2 changes: 0 additions & 2 deletions web/src/components/Article/Article.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import type { Post } from 'types/graphql'

import { Link, routes } from '@redwoodjs/router'

import CommentForm from 'src/components/CommentForm'
Expand Down
9 changes: 4 additions & 5 deletions web/src/components/Post/Post/Post.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const DELETE_POST_MUTATION = gql`
}
`

const jsonDisplay = (obj) => {
const _jsonDisplay = (obj) => {
return (
<pre>
<code>{JSON.stringify(obj, null, 2)}</code>
Expand All @@ -26,7 +26,7 @@ const timeTag = (datetime) => {
)
}

const checkboxInputTag = (checked) => {
const _checkboxInputTag = (checked) => {
return <input type="checkbox" checked={checked} disabled />
}

Expand Down Expand Up @@ -80,13 +80,12 @@ const Post = ({ post }) => {
>
Edit
</Link>
<a
href="#"
<button
className="rw-button rw-button-red"
onClick={() => onDeleteClick(post.id)}
>
Delete
</a>
</button>
</nav>
</>
)
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/Post/PostForm/PostForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Submit,
} from '@redwoodjs/forms'

const formatDatetime = (value) => {
const _formatDatetime = (value) => {
if (value) {
return value.replace(/:\d{2}\.\d{3}\w/, '')
}
Expand Down
8 changes: 4 additions & 4 deletions web/src/components/Post/Posts/Posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const truncate = (text) => {
return output
}

const jsonTruncate = (obj) => {
const _jsonTruncate = (obj) => {
return truncate(JSON.stringify(obj, null, 2))
}

Expand All @@ -34,7 +34,7 @@ const timeTag = (datetime) => {
)
}

const checkboxInputTag = (checked) => {
const _checkboxInputTag = (checked) => {
return <input type="checkbox" checked={checked} disabled />
}

Expand Down Expand Up @@ -91,14 +91,14 @@ const PostsList = ({ posts }) => {
>
Edit
</Link>
<a
<button
href="#"
title={'Delete post ' + post.id}
className="rw-button rw-button-small rw-button-red"
onClick={() => onDeleteClick(post.id)}
>
Delete
</a>
</button>
</nav>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/ResetPasswordPage/ResetPasswordPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const ResetPasswordPage = ({ resetToken }) => {
}
}
validateToken()
}, [])
}, [resetToken, validateResetToken])

const passwordRef = useRef()
useEffect(() => {
Expand Down

0 comments on commit 068cc74

Please sign in to comment.