Skip to content

Commit

Permalink
chore(lint): fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Tahul committed Nov 11, 2023
1 parent b8cf5d2 commit ad0ae15
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 15 deletions.
5 changes: 4 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"root": true,
"extends": ["@nuxt/eslint-config"]
"extends": ["@nuxt/eslint-config"],
"ignorePatterns": [
"playground/dbschema/**/*"
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dev": "nuxi dev playground",
"dev:build": "nuxi build playground",
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
"release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
"release": "npm run lint && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
"lint": "eslint .",
"test": "vitest run",
"test:watch": "vitest watch"
Expand Down
4 changes: 1 addition & 3 deletions playground/server/api/blogpost/[id].ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineEventHandler, getQuery, getRouterParams, H3Error } from 'h3'
import { defineEventHandler, getRouterParams, H3Error } from 'h3'

export default defineEventHandler(async (req) => {
const params = getRouterParams(req)
Expand All @@ -12,8 +12,6 @@ export default defineEventHandler(async (req) => {
} filter .id = ${params.id}
`)

console.log(blogpost)

return blogpost
} else {
const err = new H3Error('No domain found in query.')
Expand Down
6 changes: 2 additions & 4 deletions playground/server/api/blogpost/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineEventHandler, getQuery, getRouterParams, H3Error } from 'h3'
import { defineEventHandler } from 'h3'

export default defineEventHandler(async (req) => {
export default defineEventHandler(async () => {
const client = useEdgeDb()

const blogposts = await client.query(`
Expand All @@ -10,7 +10,5 @@ export default defineEventHandler(async (req) => {
}
`)

console.log(blogposts)

return blogposts
})
2 changes: 1 addition & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export default defineNuxtModule<ModuleOptions>({
if (options.generateInterfaces) nuxtOptions.alias['@db/interfaces'] = join(dbschemaDir, '/interfaces.ts')
if (options.generateQueryBuilder) nuxtOptions.alias['@db/builder'] = join(dbschemaDir, '/query-builder/index.ts')

nuxt.hook('prepare:types', async (_nuxtOptions) => {
nuxt.hook('prepare:types', async () => {
await generateInterfaces()
await generateQueries()
await generateQueryBuilder()
Expand Down
5 changes: 0 additions & 5 deletions src/runtime/plugin.ts

This file was deleted.

0 comments on commit ad0ae15

Please sign in to comment.