Skip to content

Commit 0b6a889

Browse files
committed
chore: fix lint issues
1 parent 95cb6e8 commit 0b6a889

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

docs/pages/getting-started/adapters/mongodb.mdx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -79,43 +79,43 @@ The MongoDB adapter does not handle connections automatically, so you will have
7979

8080
```ts filename="lib/db.ts"
8181
// This approach is taken from https://github.com/vercel/next.js/tree/canary/examples/with-mongodb
82-
import { MongoClient, ServerApiVersion } from "mongodb";
82+
import { MongoClient, ServerApiVersion } from "mongodb"
8383

8484
if (!process.env.MONGODB_URI) {
85-
throw new Error('Invalid/Missing environment variable: "MONGODB_URI"');
85+
throw new Error('Invalid/Missing environment variable: "MONGODB_URI"')
8686
}
8787

88-
const uri = process.env.MONGODB_URI;
88+
const uri = process.env.MONGODB_URI
8989
const options = {
9090
serverApi: {
9191
version: ServerApiVersion.v1,
9292
strict: true,
9393
deprecationErrors: true,
9494
},
95-
};
95+
}
9696

97-
let client;
98-
let clientPromise: Promise<MongoClient>;
97+
let client
98+
let clientPromise: Promise<MongoClient>
9999

100100
if (process.env.NODE_ENV === "development") {
101101
// In development mode, use a global variable so that the value
102102
// is preserved across module reloads caused by HMR (Hot Module Replacement).
103103
let globalWithMongo = global as typeof globalThis & {
104-
_mongoClientPromise?: Promise<MongoClient>;
105-
};
104+
_mongoClientPromise?: Promise<MongoClient>
105+
}
106106

107107
if (!globalWithMongo._mongoClientPromise) {
108-
client = new MongoClient(uri, options);
109-
globalWithMongo._mongoClientPromise = client.connect();
108+
client = new MongoClient(uri, options)
109+
globalWithMongo._mongoClientPromise = client.connect()
110110
}
111-
clientPromise = globalWithMongo._mongoClientPromise;
111+
clientPromise = globalWithMongo._mongoClientPromise
112112
} else {
113113
// In production mode, it's best to not use a global variable.
114-
client = new MongoClient(uri, options);
115-
clientPromise = client.connect();
114+
client = new MongoClient(uri, options)
115+
clientPromise = client.connect()
116116
}
117117

118118
// Export a module-scoped MongoClient promise. By doing this in a
119119
// separate module, the client can be shared across functions.
120-
export default clientPromise;
120+
export default clientPromise
121121
```

docs/pages/getting-started/providers/google.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,6 @@ export const { handlers, auth, signIn, signOut } = NextAuth({
125125
}
126126
return true // Do different verification for other providers that don't have `email_verified`
127127
},
128-
}
128+
},
129129
})
130130
```

docs/pages/getting-started/providers/workos.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,3 @@ app.use(
8484

8585
</Code.Express>
8686
</Code>
87-

docs/pages/guides/refresh-token-rotation.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const { handlers, auth } = NextAuth({
5151
access_token: account.access_token,
5252
expires_at: account.expires_at,
5353
refresh_token: account.refresh_token,
54-
user: token
54+
user: token,
5555
}
5656
} else if (Date.now() < token.expires_at * 1000) {
5757
// If the access token has not expired yet, return it
@@ -97,7 +97,7 @@ export const { handlers, auth } = NextAuth({
9797
session.error = token.error
9898
return {
9999
...session,
100-
...token
100+
...token,
101101
}
102102
},
103103
},
@@ -175,7 +175,8 @@ export const { handlers, signIn, signOut, auth } = NextAuth({
175175
data: {
176176
access_token: tokens.access_token,
177177
expires_at: Math.floor(Date.now() / 1000 + tokens.expires_in),
178-
refresh_token: tokens.refresh_token ?? googleAccount.refresh_token,
178+
refresh_token:
179+
tokens.refresh_token ?? googleAccount.refresh_token,
179180
},
180181
where: {
181182
provider_providerAccountId: {

docs/typedoc-nextauth.cjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ function writeMetaJsFiles(app) {
9393

9494
// Rename generated 'next-auth' dir to 'nextjs'
9595
if (new RegExp(".*docs/pages/reference/nextjs$").test(outputDirectory)) {
96-
if (fs.existsSync('./pages/reference/nextjs')) {
97-
fs.rmdirSync('./pages/reference/nextjs', { recursive: true })
96+
if (fs.existsSync("./pages/reference/nextjs")) {
97+
fs.rmdirSync("./pages/reference/nextjs", { recursive: true })
9898
}
99-
fs.renameSync('./pages/reference/next-auth', './pages/reference/nextjs')
99+
fs.renameSync("./pages/reference/next-auth", "./pages/reference/nextjs")
100100
}
101101

102102
const metaJString = `

0 commit comments

Comments
 (0)