diff --git a/examples/with-firebase-authentication/pages/index.js b/examples/with-firebase-authentication/pages/index.js
index b917e57561..69211f8a5c 100644
--- a/examples/with-firebase-authentication/pages/index.js
+++ b/examples/with-firebase-authentication/pages/index.js
@@ -7,7 +7,7 @@ import withAuthUser from '../utils/pageWrappers/withAuthUser'
import withAuthUserInfo from '../utils/pageWrappers/withAuthUserInfo'
import logout from '../utils/auth/logout'
-const Index = props => {
+const Index = (props) => {
const { AuthUserInfo, data } = props
const AuthUser = get(AuthUserInfo, 'AuthUser', null)
const { favoriteFood } = data
@@ -58,7 +58,7 @@ const Index = props => {
}
// Just an example.
-const mockFetchData = async userId => ({
+const mockFetchData = async (userId) => ({
user: {
...(userId && {
id: userId,
@@ -67,7 +67,7 @@ const mockFetchData = async userId => ({
favoriteFood: 'pizza',
})
-Index.getInitialProps = async ctx => {
+Index.getInitialProps = async (ctx) => {
// Get the AuthUserInfo object. This is set in `withAuthUser.js`.
// The AuthUserInfo object is available on both the server and client.
const AuthUserInfo = get(ctx, 'myCustomData.AuthUserInfo', null)
diff --git a/examples/with-firebase-authentication/utils/auth/firebaseAdmin.js b/examples/with-firebase-authentication/utils/auth/firebaseAdmin.js
index 89b13bb527..c2c8cf6610 100644
--- a/examples/with-firebase-authentication/utils/auth/firebaseAdmin.js
+++ b/examples/with-firebase-authentication/utils/auth/firebaseAdmin.js
@@ -1,6 +1,6 @@
import * as admin from 'firebase-admin'
-export const verifyIdToken = token => {
+export const verifyIdToken = (token) => {
const firebasePrivateKey = process.env.FIREBASE_PRIVATE_KEY
if (!admin.apps.length) {
@@ -18,7 +18,7 @@ export const verifyIdToken = token => {
return admin
.auth()
.verifyIdToken(token)
- .catch(error => {
+ .catch((error) => {
throw error
})
}
diff --git a/examples/with-firebase-authentication/utils/auth/firebaseSessionHandler.js b/examples/with-firebase-authentication/utils/auth/firebaseSessionHandler.js
index dce481ff34..cb1f3f87b3 100644
--- a/examples/with-firebase-authentication/utils/auth/firebaseSessionHandler.js
+++ b/examples/with-firebase-authentication/utils/auth/firebaseSessionHandler.js
@@ -1,10 +1,10 @@
// From:
// https://github.com/zeit/next.js/blob/canary/examples/with-firebase-authentication/pages/index.js
-export const setSession = user => {
+export const setSession = (user) => {
// Log in.
if (user) {
- return user.getIdToken().then(token => {
+ return user.getIdToken().then((token) => {
return fetch('/api/login', {
method: 'POST',
// eslint-disable-next-line no-undef
diff --git a/examples/with-firebase-authentication/utils/auth/logout.js b/examples/with-firebase-authentication/utils/auth/logout.js
index 9e64e7239b..f113d0ef30 100644
--- a/examples/with-firebase-authentication/utils/auth/logout.js
+++ b/examples/with-firebase-authentication/utils/auth/logout.js
@@ -20,7 +20,7 @@ export default async () => {
}
return true
})
- .catch(e => {
+ .catch((e) => {
console.error(e)
return false
})
diff --git a/examples/with-firebase-authentication/utils/auth/user.js b/examples/with-firebase-authentication/utils/auth/user.js
index e143d08035..a6be82ce04 100644
--- a/examples/with-firebase-authentication/utils/auth/user.js
+++ b/examples/with-firebase-authentication/utils/auth/user.js
@@ -10,7 +10,7 @@ import { get, has } from 'lodash/object'
* @return {String} AuthUser.email - The user's email
* @return {Boolean} AuthUser.emailVerified - Whether the user has verified their email
*/
-export const createAuthUser = firebaseUser => {
+export const createAuthUser = (firebaseUser) => {
if (!firebaseUser || !firebaseUser.uid) {
return null
}
diff --git a/examples/with-firebase-authentication/utils/middleware/commonMiddleware.js b/examples/with-firebase-authentication/utils/middleware/commonMiddleware.js
index 59c7a1d0a9..17f1de3d90 100644
--- a/examples/with-firebase-authentication/utils/middleware/commonMiddleware.js
+++ b/examples/with-firebase-authentication/utils/middleware/commonMiddleware.js
@@ -1,4 +1,4 @@
import cookieSession from './cookieSession'
import cookieSessionRefresh from './cookieSessionRefresh'
-export default handler => cookieSession(cookieSessionRefresh(handler))
+export default (handler) => cookieSession(cookieSessionRefresh(handler))
diff --git a/examples/with-firebase-authentication/utils/middleware/cookieSession.js b/examples/with-firebase-authentication/utils/middleware/cookieSession.js
index 44e2334624..01f5cf14a0 100644
--- a/examples/with-firebase-authentication/utils/middleware/cookieSession.js
+++ b/examples/with-firebase-authentication/utils/middleware/cookieSession.js
@@ -31,7 +31,7 @@ export const addSession = (req, res) => {
includeSession(req, res, () => {})
}
-export default handler => (req, res) => {
+export default (handler) => (req, res) => {
try {
addSession(req, res)
} catch (e) {
diff --git a/examples/with-firebase-authentication/utils/middleware/cookieSessionRefresh.js b/examples/with-firebase-authentication/utils/middleware/cookieSessionRefresh.js
index 27109a78d0..9ff904d391 100644
--- a/examples/with-firebase-authentication/utils/middleware/cookieSessionRefresh.js
+++ b/examples/with-firebase-authentication/utils/middleware/cookieSessionRefresh.js
@@ -1,7 +1,7 @@
// Update a value in the cookie so that the set-cookie will be sent.
// Only changes every minute so that it's not sent with every request.
// https://github.com/expressjs/cookie-session#extending-the-session-expiration
-export default handler => (req, res) => {
+export default (handler) => (req, res) => {
if (req.session) {
req.session.nowInMinutes = Math.floor(Date.now() / 60e3)
}
diff --git a/examples/with-firebase-authentication/utils/pageWrappers/withAuthUser.js b/examples/with-firebase-authentication/utils/pageWrappers/withAuthUser.js
index 305642a8f1..7bb343aa64 100644
--- a/examples/with-firebase-authentication/utils/pageWrappers/withAuthUser.js
+++ b/examples/with-firebase-authentication/utils/pageWrappers/withAuthUser.js
@@ -9,8 +9,8 @@ import { createAuthUser, createAuthUserInfo } from '../auth/user'
// Gets the authenticated user from the Firebase JS SDK, when client-side,
// or from the request object, when server-side. Add the AuthUserInfo to
// context.
-export default ComposedComponent => {
- const WithAuthUserComp = props => {
+export default (ComposedComponent) => {
+ const WithAuthUserComp = (props) => {
const { AuthUserInfo, ...otherProps } = props
// We'll use the authed user from client-side auth (Firebase JS SDK)
@@ -29,7 +29,7 @@ export default ComposedComponent => {
)
}
- WithAuthUserComp.getInitialProps = async ctx => {
+ WithAuthUserComp.getInitialProps = async (ctx) => {
const { req, res } = ctx
// Get the AuthUserInfo object.
diff --git a/examples/with-firebase-authentication/utils/pageWrappers/withAuthUserInfo.js b/examples/with-firebase-authentication/utils/pageWrappers/withAuthUserInfo.js
index 5701b5c88d..401807ddcb 100644
--- a/examples/with-firebase-authentication/utils/pageWrappers/withAuthUserInfo.js
+++ b/examples/with-firebase-authentication/utils/pageWrappers/withAuthUserInfo.js
@@ -6,12 +6,12 @@ import { get } from 'lodash/object'
import { AuthUserInfoContext } from '../auth/hooks'
// Provides an AuthUserInfo prop to the composed component.
-export default ComposedComponent => {
- const WithAuthUserInfoComp = props => {
+export default (ComposedComponent) => {
+ const WithAuthUserInfoComp = (props) => {
const { AuthUserInfo: AuthUserInfoFromSession, ...otherProps } = props
return (
- {AuthUserInfo => (
+ {(AuthUserInfo) => (
{
)
}
- WithAuthUserInfoComp.getInitialProps = async ctx => {
+ WithAuthUserInfoComp.getInitialProps = async (ctx) => {
const AuthUserInfo = get(ctx, 'myCustomData.AuthUserInfo', null)
// Evaluate the composed component's getInitialProps().
diff --git a/examples/with-firebase-cloud-messaging/server.js b/examples/with-firebase-cloud-messaging/server.js
index 5caff65ee3..12eb993dbc 100644
--- a/examples/with-firebase-cloud-messaging/server.js
+++ b/examples/with-firebase-cloud-messaging/server.js
@@ -34,7 +34,7 @@ app.prepare().then(() => {
return handle(req, res)
})
- server.listen(port, err => {
+ server.listen(port, (err) => {
if (err) throw err
console.log(`> Ready on http://localhost:${port}`)
})
diff --git a/examples/with-firebase-cloud-messaging/utils/webPush.js b/examples/with-firebase-cloud-messaging/utils/webPush.js
index 185a569b29..78177ee211 100644
--- a/examples/with-firebase-cloud-messaging/utils/webPush.js
+++ b/examples/with-firebase-cloud-messaging/utils/webPush.js
@@ -7,7 +7,7 @@ const firebaseCloudMessaging = {
return localforage.getItem('fcm_token')
},
- init: async function() {
+ init: async function () {
firebase.initializeApp({
apiKey: 'YOUR-API-KEY',
projectId: 'YOUR-PROJECT-ID',
diff --git a/examples/with-firebase/context/userContext.js b/examples/with-firebase/context/userContext.js
index dd82753f87..23f6f216c6 100644
--- a/examples/with-firebase/context/userContext.js
+++ b/examples/with-firebase/context/userContext.js
@@ -9,7 +9,7 @@ export default ({ children }) => {
useEffect(() => {
// Listen authenticated user
- const unsubscriber = firebase.auth().onAuthStateChanged(async user => {
+ const unsubscriber = firebase.auth().onAuthStateChanged(async (user) => {
try {
if (user) {
// User is signed in.
diff --git a/examples/with-google-analytics-amp/components/amp/AmpAnalytics.js b/examples/with-google-analytics-amp/components/amp/AmpAnalytics.js
index cfd7580be5..4c6c7183e3 100644
--- a/examples/with-google-analytics-amp/components/amp/AmpAnalytics.js
+++ b/examples/with-google-analytics-amp/components/amp/AmpAnalytics.js
@@ -2,7 +2,7 @@ import React from 'react'
import AmpIncludeCustomElement from './AmpIncludeCustomElement'
-export default props => (
+export default (props) => (
<>
diff --git a/examples/with-google-analytics-amp/components/amp/AmpIncludeCustomElement.js b/examples/with-google-analytics-amp/components/amp/AmpIncludeCustomElement.js
index 6fa77501ad..b313087f9b 100644
--- a/examples/with-google-analytics-amp/components/amp/AmpIncludeCustomElement.js
+++ b/examples/with-google-analytics-amp/components/amp/AmpIncludeCustomElement.js
@@ -1,7 +1,7 @@
import React from 'react'
import Head from 'next/head'
-export default props => (
+export default (props) => (