Skip to content

Commit

Permalink
🎨 rw lint --fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tktcorporation committed Oct 10, 2022
1 parent 25a2e2e commit aae8eb6
Show file tree
Hide file tree
Showing 22 changed files with 38 additions and 26 deletions.
3 changes: 2 additions & 1 deletion api/src/functions/auth.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { db } from 'src/lib/db'
import { DbAuthHandler } from '@redwoodjs/api'

import { db } from 'src/lib/db'

export const handler = async (event, context) => {
const forgotPasswordOptions = {
// handler() is invoked after verifying that a user was found with the given
Expand Down
1 change: 1 addition & 0 deletions api/src/lib/auth.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { AuthenticationError, ForbiddenError } from '@redwoodjs/graphql-server'

import { db } from './db'

/**
Expand Down
3 changes: 2 additions & 1 deletion api/src/services/contacts/contacts.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { db } from 'src/lib/db'
import { validate } from '@redwoodjs/api'

import { db } from 'src/lib/db'

export const contacts = () => {
return db.contact.findMany()
}
Expand Down
4 changes: 2 additions & 2 deletions api/src/services/posts/posts.scenarios.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export const standard = defineScenario({
post: {
one: {
data: { title: 'String', body: 'String' }
data: { title: 'String', body: 'String' },
},
two: {
data: { title: 'String', body: 'String' }
data: { title: 'String', body: 'String' },
},
},
})
2 changes: 1 addition & 1 deletion web/src/App.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { AuthProvider } from '@redwoodjs/auth'
import { FatalErrorBoundary, RedwoodProvider } from '@redwoodjs/web'
import { RedwoodApolloProvider } from '@redwoodjs/web/apollo'
import FatalErrorPage from 'src/pages/FatalErrorPage'

import FatalErrorPage from 'src/pages/FatalErrorPage'
import Routes from 'src/Routes'

import './scaffold.css'
Expand Down
3 changes: 2 additions & 1 deletion web/src/Routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
// 'src/pages/Admin/BooksPage/BooksPage.js' -> AdminBooksPage

import { Router, Route, Private, Set } from '@redwoodjs/router'
import PostsLayout from 'src/layouts/PostsLayout'

import BlogLayout from 'src/layouts/BlogLayout'
import PostsLayout from 'src/layouts/PostsLayout'

const Routes = () => {
return (
Expand Down
3 changes: 1 addition & 2 deletions web/src/components/Article/Article.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ export const generated = () => {
article={{
id: 1,
title: 'First Post',
body:
'Neutra tacos hot chicken prism raw denim, put a bird on it enamel pin post-ironic vape cred DIY. Street art next level umami squid. Hammock hexagon glossier 8-bit banjo. Neutra la croix mixtape echo park four loko semiotics kitsch forage chambray. Semiotics salvia selfies jianbing hella shaman. Letterpress helvetica vaporware cronut, shaman butcher YOLO poke fixie hoodie gentrify woke heirloom.',
body: 'Neutra tacos hot chicken prism raw denim, put a bird on it enamel pin post-ironic vape cred DIY. Street art next level umami squid. Hammock hexagon glossier 8-bit banjo. Neutra la croix mixtape echo park four loko semiotics kitsch forage chambray. Semiotics salvia selfies jianbing hella shaman. Letterpress helvetica vaporware cronut, shaman butcher YOLO poke fixie hoodie gentrify woke heirloom.',
createdAt: '2020-01-01T12:34:56Z',
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/ArticleCell/ArticleCell.mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export const standard = () => {
createdAt: '2020-01-01T12:34:56Z',
},
}
};
}
1 change: 1 addition & 0 deletions web/src/components/ArticleCell/ArticleCell.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { render, screen } from '@redwoodjs/testing'

import { Loading, Empty, Failure, Success } from './ArticleCell'
import { standard } from './ArticleCell.mock'

Expand Down
2 changes: 1 addition & 1 deletion web/src/components/ArticlesCell/ArticlesCell.mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ export const standard = () => {
},
],
}
};
}
3 changes: 2 additions & 1 deletion web/src/components/Post/EditPostCell/EditPostCell.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { navigate, routes } from '@redwoodjs/router'
import { useMutation } from '@redwoodjs/web'
import { toast } from '@redwoodjs/web/toast'
import { navigate, routes } from '@redwoodjs/router'

import PostForm from 'src/components/Post/PostForm'

export const QUERY = gql`
Expand Down
3 changes: 2 additions & 1 deletion web/src/components/Post/NewPost/NewPost.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { navigate, routes } from '@redwoodjs/router'
import { useMutation } from '@redwoodjs/web'
import { toast } from '@redwoodjs/web/toast'
import { navigate, routes } from '@redwoodjs/router'

import PostForm from 'src/components/Post/PostForm'

const CREATE_POST_MUTATION = gql`
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/Post/Post/Post.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Link, routes, navigate } from '@redwoodjs/router'
import { useMutation } from '@redwoodjs/web'
import { toast } from '@redwoodjs/web/toast'
import { Link, routes, navigate } from '@redwoodjs/router'

const DELETE_POST_MUTATION = gql`
mutation DeletePostMutation($id: Int!) {
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/Post/Posts/Posts.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Link, routes } from '@redwoodjs/router'
import { useMutation } from '@redwoodjs/web'
import { toast } from '@redwoodjs/web/toast'
import { Link, routes } from '@redwoodjs/router'

import { QUERY } from 'src/components/Post/PostsCell'

Expand Down
2 changes: 1 addition & 1 deletion web/src/layouts/BlogLayout/BlogLayout.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Link, routes } from '@redwoodjs/router'
import { useAuth } from '@redwoodjs/auth'
import { Link, routes } from '@redwoodjs/router'

const BlogLayout = ({ children }) => {
const { logIn, logOut, isAuthenticated, currentUser } = useAuth()
Expand Down
1 change: 1 addition & 0 deletions web/src/pages/ArticlePage/ArticlePage.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { MetaTags } from '@redwoodjs/web'

import ArticleCell from 'src/components/ArticleCell'

const ArticlePage = ({ id }) => {
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/ContactPage/ContactPage.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { MetaTags } from '@redwoodjs/web'
import {
Form,
TextField,
Expand All @@ -9,6 +8,7 @@ import {
FormError,
useForm,
} from '@redwoodjs/forms'
import { MetaTags } from '@redwoodjs/web'
import { useMutation } from '@redwoodjs/web'
import { toast, Toaster } from '@redwoodjs/web/toast'

Expand Down
3 changes: 2 additions & 1 deletion web/src/pages/ForgotPasswordPage/ForgotPasswordPage.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { useEffect, useRef } from 'react'

import { useAuth } from '@redwoodjs/auth'
import { Form, Label, TextField, Submit, FieldError } from '@redwoodjs/forms'
import { navigate, routes } from '@redwoodjs/router'
import { MetaTags } from '@redwoodjs/web'
import { toast, Toaster } from '@redwoodjs/web/toast'
import { Form, Label, TextField, Submit, FieldError } from '@redwoodjs/forms'

const ForgotPasswordPage = () => {
const { isAuthenticated, forgotPassword } = useAuth()
Expand Down
1 change: 1 addition & 0 deletions web/src/pages/HomePage/HomePage.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { MetaTags } from '@redwoodjs/web'

import ArticlesCell from 'src/components/ArticlesCell'

const HomePage = () => {
Expand Down
7 changes: 4 additions & 3 deletions web/src/pages/LoginPage/LoginPage.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Link, navigate, routes } from '@redwoodjs/router'
import { useRef } from 'react'
import { useEffect } from 'react'

import { useAuth } from '@redwoodjs/auth'
import {
Form,
Label,
Expand All @@ -8,10 +10,9 @@ import {
Submit,
FieldError,
} from '@redwoodjs/forms'
import { useAuth } from '@redwoodjs/auth'
import { Link, navigate, routes } from '@redwoodjs/router'
import { MetaTags } from '@redwoodjs/web'
import { toast, Toaster } from '@redwoodjs/web/toast'
import { useEffect } from 'react'

const LoginPage = () => {
const { isAuthenticated, logIn } = useAuth()
Expand Down
7 changes: 4 additions & 3 deletions web/src/pages/ResetPasswordPage/ResetPasswordPage.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { useEffect, useRef, useState } from 'react'

import { useAuth } from '@redwoodjs/auth'
import { navigate, routes } from '@redwoodjs/router'
import { MetaTags } from '@redwoodjs/web'
import { toast, Toaster } from '@redwoodjs/web/toast'
import {
Form,
Label,
PasswordField,
Submit,
FieldError,
} from '@redwoodjs/forms'
import { navigate, routes } from '@redwoodjs/router'
import { MetaTags } from '@redwoodjs/web'
import { toast, Toaster } from '@redwoodjs/web/toast'

const ResetPasswordPage = ({ resetToken }) => {
const { isAuthenticated, reauthenticate, validateResetToken, resetPassword } =
Expand Down
7 changes: 4 additions & 3 deletions web/src/pages/SignupPage/SignupPage.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Link, navigate, routes } from '@redwoodjs/router'
import { useRef } from 'react'
import { useEffect } from 'react'

import { useAuth } from '@redwoodjs/auth'
import {
Form,
Label,
Expand All @@ -8,10 +10,9 @@ import {
FieldError,
Submit,
} from '@redwoodjs/forms'
import { useAuth } from '@redwoodjs/auth'
import { Link, navigate, routes } from '@redwoodjs/router'
import { MetaTags } from '@redwoodjs/web'
import { toast, Toaster } from '@redwoodjs/web/toast'
import { useEffect } from 'react'

const SignupPage = () => {
const { isAuthenticated, signUp } = useAuth()
Expand Down

0 comments on commit aae8eb6

Please sign in to comment.