mirror of
https://github.com/MedzikUser/gatsby-pingbot
synced 2024-08-15 03:20:27 +00:00
fix(lint): manually lint
This commit is contained in:
parent
e05e22cc59
commit
8f5a8272a7
6 changed files with 23 additions and 19 deletions
|
@ -1,2 +1,5 @@
|
|||
# Gatsby
|
||||
public/
|
||||
.cache
|
||||
|
||||
.vercel
|
||||
|
|
|
@ -19,7 +19,13 @@
|
|||
"react"
|
||||
],
|
||||
"rules": {
|
||||
"semi": [ "error", "never" ],
|
||||
"quotes": [ "error", "double" ]
|
||||
"semi": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"quotes": [
|
||||
"error",
|
||||
"double"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import connectToDatabase from "./lib/dbConnect"
|
||||
import fetch from "node-fetch"
|
||||
|
||||
import connectToDatabase from "./lib/dbConnect"
|
||||
|
||||
export default async (req, res) => {
|
||||
const { method } = req
|
||||
const db = await connectToDatabase()
|
||||
|
|
|
@ -2,18 +2,6 @@ import { MongoClient } from "mongodb"
|
|||
|
||||
const { MONGODB_URI, MONGODB_DB, MONGODB_COLLECTION } = process.env
|
||||
|
||||
if (!MONGODB_URI) {
|
||||
throw new Error(
|
||||
"Please define the MONGODB_URI environment variable inside .env.local"
|
||||
)
|
||||
}
|
||||
|
||||
if (!MONGODB_DB) {
|
||||
throw new Error(
|
||||
"Please define the MONGODB_DB environment variable inside .env.local"
|
||||
)
|
||||
}
|
||||
|
||||
let cached = global.mongo
|
||||
|
||||
if (!cached) {
|
||||
|
@ -39,5 +27,6 @@ export default async function connectToDatabase() {
|
|||
})
|
||||
}
|
||||
cached.conn = await cached.promise
|
||||
|
||||
return cached.conn
|
||||
}
|
||||
|
|
|
@ -6,6 +6,8 @@ module.exports = {
|
|||
},
|
||||
plugins: [
|
||||
"gatsby-plugin-react-helmet",
|
||||
"gatsby-plugin-transition-link",
|
||||
"gatsby-plugin-sass",
|
||||
{
|
||||
resolve: "gatsby-plugin-manifest",
|
||||
options: {
|
||||
|
@ -17,8 +19,6 @@ module.exports = {
|
|||
display: "minimal-ui",
|
||||
icon: "src/images/icon.png", // This path is relative to the root of the site.
|
||||
}
|
||||
},
|
||||
"gatsby-plugin-transition-link",
|
||||
"gatsby-plugin-sass"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -6,7 +6,12 @@
|
|||
"prCreation": "immediate",
|
||||
"packageRules": [
|
||||
{
|
||||
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
|
||||
"matchUpdateTypes": [
|
||||
"minor",
|
||||
"patch",
|
||||
"pin",
|
||||
"digest"
|
||||
],
|
||||
"automerge": true
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue