Reformat again

This commit is contained in:
Michael Zhang 2021-12-28 01:12:59 -06:00
parent fc5d5a783b
commit fa50a3662a
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
17 changed files with 180 additions and 67 deletions

View file

@ -1,11 +1,14 @@
module.exports = {
root: true,
env: {
browser: true,
node: true
"root": true,
"env": {
"browser": true,
"node": true,
},
"extends": ["@nuxtjs/eslint-config-typescript", "plugin:nuxt/recommended", "prettier"],
"plugins": [],
"rules": {
"quote-props": ["error", "always"],
"no-unused-vars": ["off"],
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
},
extends: ['@nuxtjs/eslint-config-typescript', 'plugin:nuxt/recommended', 'prettier'],
plugins: [],
// add your custom rules here
rules: {}
};

2
.gitignore vendored
View file

@ -1,3 +1,5 @@
test.db*
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs

View file

@ -3,6 +3,7 @@
###
# .gitignore content is duplicated here due to https://github.com/prettier/prettier/issues/8506
package-lock.json
# Created by .ignore support plugin (hsz.mobi)
### Node template

View file

@ -1,7 +1,7 @@
{
useTabs: false,
tabWidth: 2,
singleQuote: true,
trailingComma: 'none',
printWidth: 100
singleQuote: false,
trailingComma: "all",
printWidth: 100,
}

View file

15
api/index.ts Normal file
View file

@ -0,0 +1,15 @@
import express from "express";
import { PrismaClient } from "@prisma/client";
const _prisma = new PrismaClient();
const app = express();
app.use(express.json());
/**
* logic for our api will go here
*/
export default {
"path": "/api",
"handler": app,
};

View file

@ -24,16 +24,16 @@
<script>
export default {
name: 'BuefyCard',
props: {
title: {
type: String,
required: true
"name": "BuefyCard",
"props": {
"title": {
"type": String,
"required": true,
},
"icon": {
"type": String,
"required": true,
},
},
icon: {
type: String,
required: true
}
}
};
</script>

View file

@ -106,6 +106,6 @@
<script>
export default {
name: 'NuxtTutorial'
"name": "NuxtTutorial",
};
</script>

View file

@ -37,22 +37,22 @@
<script>
export default {
name: 'DefaultLayout',
"name": "DefaultLayout",
data() {
return {
items: [
"items": [
{
title: 'Home',
icon: 'home',
to: { name: 'index' }
"title": "Home",
"icon": "home",
"to": { "name": "index" },
},
{
title: 'Inspire',
icon: 'lightbulb',
to: { name: 'inspire' }
}
]
"title": "Inspire",
"icon": "lightbulb",
"to": { "name": "inspire" },
},
],
};
}
},
};
</script>

View file

@ -1,50 +1,50 @@
export default {
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: 'eduproj',
htmlAttrs: {
lang: 'en'
"head": {
"title": "eduproj",
"htmlAttrs": {
"lang": "en",
},
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: '' },
{ name: 'format-detection', content: 'telephone=no' }
"meta": [
{ "charset": "utf-8" },
{ "name": "viewport", "content": "width=device-width, initial-scale=1" },
{ "hid": "description", "name": "description", "content": "" },
{ "name": "format-detection", "content": "telephone=no" },
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }]
"link": [{ "rel": "icon", "type": "image/x-icon", "href": "/favicon.ico" }],
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: [],
"css": [],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [],
"plugins": [],
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
"components": true,
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [
"buildModules": [
// https://go.nuxtjs.dev/typescript
'@nuxt/typescript-build'
"@nuxt/typescript-build",
],
// Modules: https://go.nuxtjs.dev/config-modules
modules: [
"modules": [
// https://go.nuxtjs.dev/buefy
'nuxt-buefy',
"nuxt-buefy",
// https://go.nuxtjs.dev/axios
'@nuxtjs/axios'
"@nuxtjs/axios",
],
// Axios module configuration: https://go.nuxtjs.dev/config-axios
axios: {
"axios": {
// Workaround to avoid enforcing hard-coded localhost:3000: https://github.com/nuxt-community/axios-module/issues/308
baseURL: '/'
"baseURL": "/",
},
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {},
"build": {},
serverMiddleware: [{ path: '/api', handler: '~/api' }]
"serverMiddleware": [{ "path": "/api", "handler": "~/api" }],
};

81
package-lock.json generated
View file

@ -9,6 +9,7 @@
"version": "1.0.0",
"dependencies": {
"@nuxtjs/axios": "^5.13.6",
"@prisma/client": "^3.7.0",
"core-js": "^3.19.3",
"nuxt": "^2.15.8",
"nuxt-buefy": "^0.4.13",
@ -27,7 +28,8 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-nuxt": "^3.1.0",
"eslint-plugin-vue": "^8.2.0",
"prettier": "^2.5.1"
"prettier": "^2.5.1",
"prisma": "^3.7.0"
}
},
"node_modules/@babel/code-frame": {
@ -2780,6 +2782,38 @@
"resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz",
"integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g=="
},
"node_modules/@prisma/client": {
"version": "3.7.0",
"resolved": "https://registry.npmjs.org/@prisma/client/-/client-3.7.0.tgz",
"integrity": "sha512-fUJMvBOX5C7JPc0e3CJD6Gbelbu4dMJB4ScYpiht8HMUnRShw20ULOipTopjNtl6ekHQJ4muI7pXlQxWS9nMbw==",
"hasInstallScript": true,
"dependencies": {
"@prisma/engines-version": "3.7.0-31.8746e055198f517658c08a0c426c7eec87f5a85f"
},
"engines": {
"node": ">=12.6"
},
"peerDependencies": {
"prisma": "*"
},
"peerDependenciesMeta": {
"prisma": {
"optional": true
}
}
},
"node_modules/@prisma/engines": {
"version": "3.7.0-31.8746e055198f517658c08a0c426c7eec87f5a85f",
"resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-3.7.0-31.8746e055198f517658c08a0c426c7eec87f5a85f.tgz",
"integrity": "sha512-W549ub5NlgexNhR8EFstA/UwAWq3Zq0w9aNkraqsozVCt2CsX+lK4TK7IW5OZVSnxHwRjrgEAt3r9yPy8nZQRg==",
"devOptional": true,
"hasInstallScript": true
},
"node_modules/@prisma/engines-version": {
"version": "3.7.0-31.8746e055198f517658c08a0c426c7eec87f5a85f",
"resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-3.7.0-31.8746e055198f517658c08a0c426c7eec87f5a85f.tgz",
"integrity": "sha512-+qx2b+HK7BKF4VCa0LZ/t1QCXsu6SmvhUQyJkOD2aPpmOzket4fEnSKQZSB0i5tl7rwCDsvAiSeK8o7rf+yvwg=="
},
"node_modules/@types/anymatch": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@types/anymatch/-/anymatch-3.0.0.tgz",
@ -12274,6 +12308,23 @@
"node": ">=4"
}
},
"node_modules/prisma": {
"version": "3.7.0",
"resolved": "https://registry.npmjs.org/prisma/-/prisma-3.7.0.tgz",
"integrity": "sha512-pzgc95msPLcCHqOli7Hnabu/GRfSGSUWl5s2P6N13T/rgMB+NNeKbxCmzQiZT2yLOeLEPivV6YrW1oeQIwJxcg==",
"devOptional": true,
"hasInstallScript": true,
"dependencies": {
"@prisma/engines": "3.7.0-31.8746e055198f517658c08a0c426c7eec87f5a85f"
},
"bin": {
"prisma": "build/index.js",
"prisma2": "build/index.js"
},
"engines": {
"node": ">=12.6"
}
},
"node_modules/process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
@ -18608,6 +18659,25 @@
"resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz",
"integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g=="
},
"@prisma/client": {
"version": "3.7.0",
"resolved": "https://registry.npmjs.org/@prisma/client/-/client-3.7.0.tgz",
"integrity": "sha512-fUJMvBOX5C7JPc0e3CJD6Gbelbu4dMJB4ScYpiht8HMUnRShw20ULOipTopjNtl6ekHQJ4muI7pXlQxWS9nMbw==",
"requires": {
"@prisma/engines-version": "3.7.0-31.8746e055198f517658c08a0c426c7eec87f5a85f"
}
},
"@prisma/engines": {
"version": "3.7.0-31.8746e055198f517658c08a0c426c7eec87f5a85f",
"resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-3.7.0-31.8746e055198f517658c08a0c426c7eec87f5a85f.tgz",
"integrity": "sha512-W549ub5NlgexNhR8EFstA/UwAWq3Zq0w9aNkraqsozVCt2CsX+lK4TK7IW5OZVSnxHwRjrgEAt3r9yPy8nZQRg==",
"devOptional": true
},
"@prisma/engines-version": {
"version": "3.7.0-31.8746e055198f517658c08a0c426c7eec87f5a85f",
"resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-3.7.0-31.8746e055198f517658c08a0c426c7eec87f5a85f.tgz",
"integrity": "sha512-+qx2b+HK7BKF4VCa0LZ/t1QCXsu6SmvhUQyJkOD2aPpmOzket4fEnSKQZSB0i5tl7rwCDsvAiSeK8o7rf+yvwg=="
},
"@types/anymatch": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@types/anymatch/-/anymatch-3.0.0.tgz",
@ -26014,6 +26084,15 @@
"resolved": "https://registry.npmjs.org/pretty-time/-/pretty-time-1.1.0.tgz",
"integrity": "sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA=="
},
"prisma": {
"version": "3.7.0",
"resolved": "https://registry.npmjs.org/prisma/-/prisma-3.7.0.tgz",
"integrity": "sha512-pzgc95msPLcCHqOli7Hnabu/GRfSGSUWl5s2P6N13T/rgMB+NNeKbxCmzQiZT2yLOeLEPivV6YrW1oeQIwJxcg==",
"devOptional": true,
"requires": {
"@prisma/engines": "3.7.0-31.8746e055198f517658c08a0c426c7eec87f5a85f"
}
},
"process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",

View file

@ -11,10 +11,11 @@
"lint:prettier": "prettier --check .",
"lint": "npm run lint:js && npm run lint:prettier",
"lintfix": "prettier --write --list-different . && npm run lint:js -- --fix",
"migrate": "prisma migrate"
"migrate": "prisma migrate dev"
},
"dependencies": {
"@nuxtjs/axios": "^5.13.6",
"@prisma/client": "^3.7.0",
"core-js": "^3.19.3",
"nuxt": "^2.15.8",
"nuxt-buefy": "^0.4.13",
@ -33,6 +34,7 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-nuxt": "^3.1.0",
"eslint-plugin-vue": "^8.2.0",
"prettier": "^2.5.1"
"prettier": "^2.5.1",
"prisma": "^3.7.0"
}
}

View file

@ -20,12 +20,12 @@
</template>
<script>
import Card from '~/components/Card';
import Card from "~/components/Card";
export default {
name: 'IndexPage',
components: {
Card
}
"name": "IndexPage",
"components": {
Card,
},
};
</script>

View file

@ -9,6 +9,6 @@
<script>
export default {
name: 'InspirePage'
"name": "InspirePage",
};
</script>

View file

@ -0,0 +1,9 @@
-- CreateTable
CREATE TABLE "User" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"email" TEXT NOT NULL,
"name" TEXT
);
-- CreateIndex
CREATE UNIQUE INDEX "User_email_key" ON "User"("email");

View file

@ -0,0 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (i.e. Git)
provider = "sqlite"

View file

@ -6,13 +6,12 @@ generator client {
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
provider = "sqlite"
url = "file:./test.db"
}
model User {
id Int @id @default(autoincrement())
email String @unique
name String?
posts Post[]
}