fix(lint): manually lint

This commit is contained in:
Medzik 2021-08-11 20:22:16 +00:00
parent e05e22cc59
commit 8f5a8272a7
6 changed files with 23 additions and 19 deletions

View File

@ -1,2 +1,5 @@
# Gatsby
public/
.cache
.vercel

View File

@ -19,7 +19,13 @@
"react"
],
"rules": {
"semi": [ "error", "never" ],
"quotes": [ "error", "double" ]
"semi": [
"error",
"never"
],
"quotes": [
"error",
"double"
]
}
}

View File

@ -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()

View File

@ -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
}

View File

@ -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"
}
]
}

View File

@ -6,7 +6,12 @@
"prCreation": "immediate",
"packageRules": [
{
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
"matchUpdateTypes": [
"minor",
"patch",
"pin",
"digest"
],
"automerge": true
}
]