Skip to content

Commit a6595bc

Browse files
committed
feat(useedgedbpkce): fix imports on all occurences; also add linting
1 parent 36402b8 commit a6595bc

48 files changed

Lines changed: 2291 additions & 1068 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
// Enable the ESlint flat config support
3+
"eslint.experimental.useFlatConfig": true,
4+
5+
// Disable the default formatter, use eslint instead
6+
"prettier.enable": false,
7+
"editor.formatOnSave": false,
8+
9+
// Auto fix
10+
"editor.codeActionsOnSave": {
11+
"source.fixAll.eslint": "explicit",
12+
"source.organizeImports": "never"
13+
},
14+
15+
// Silent the stylistic rules in you IDE, but still auto fix them
16+
"eslint.rules.customizations": [
17+
{ "rule": "style/*", "severity": "off" },
18+
{ "rule": "*-indent", "severity": "off" },
19+
{ "rule": "*-spacing", "severity": "off" },
20+
{ "rule": "*-spaces", "severity": "off" },
21+
{ "rule": "*-order", "severity": "off" },
22+
{ "rule": "*-dangle", "severity": "off" },
23+
{ "rule": "*-newline", "severity": "off" },
24+
{ "rule": "*quotes", "severity": "off" },
25+
{ "rule": "*semi", "severity": "off" }
26+
],
27+
28+
// Enable eslint for all supported languages
29+
"eslint.validate": [
30+
"javascript",
31+
"javascriptreact",
32+
"typescript",
33+
"typescriptreact",
34+
"vue",
35+
"html",
36+
"markdown",
37+
"json",
38+
"jsonc",
39+
"yaml"
40+
]
41+
}

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,8 @@ You will also need a call back page, that can use `EdgeDbAuthCallback`.
437437
<p v-if="loading">
438438
Loading...
439439
</p>
440-
</UCard>
440+
</UCard>
441+
</div>
441442
</EdgeDbOAuthCallback>
442443
</template>
443444
```
@@ -594,8 +595,8 @@ I guess that can be useful for a super-admin/internal dashboard, but use it at y
594595
<script setup lang="ts">
595596
import e, { type $infer } from '@db/builder'
596597
597-
const query = e.select(e.Movie, () => ({ id: true, title: true }));
598-
type result = $infer<typeof query>;
598+
const query = e.select(e.Movie, () => ({ id: true, title: true }))
599+
type result = $infer<typeof query>
599600
// ^ { id: string; title: string }[]
600601
</script>
601602
```

build.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ export default defineBuildConfig({
77
'chalk',
88
'prompts',
99
'edgedb',
10-
'@edgedb/generate'
11-
]
10+
'@edgedb/generate',
11+
],
1212
})

eslint.config.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import antfu from '@antfu/eslint-config'
2+
3+
export default await antfu(
4+
{
5+
ignores: [
6+
'dist',
7+
'node_modules',
8+
'*.md',
9+
],
10+
},
11+
{
12+
rules: {
13+
'no-console': 'off',
14+
'node/prefer-global/process': 'off',
15+
},
16+
},
17+
)

minimal-starter/nuxt.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
export default defineNuxtConfig({
22
modules: [
3-
'../src/module'
3+
'../src/module',
44
],
55
edgeDb: {
66
auth: true,
7-
oauth: true
7+
oauth: true,
88
},
9-
devtools: { enabled: true }
9+
devtools: { enabled: true },
1010
})

minimal-starter/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"private": true,
32
"name": "my-module-playground",
43
"type": "module",
4+
"private": true,
55
"scripts": {
66
"dev": "nuxi dev",
77
"build": "nuxi build",
88
"generate": "nuxi generate"
99
},
10+
"dependencies": {
11+
"@edgedb/generate": "^0.4.1"
12+
},
1013
"devDependencies": {
1114
"@nuxt/devtools": "latest",
1215
"nuxt": "latest"
13-
},
14-
"dependencies": {
15-
"@edgedb/generate": "^0.4.1"
1616
}
1717
}

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "nuxt-edgedb-module",
3+
"type": "module",
34
"version": "0.0.10",
45
"description": "Nuxt 3 integration for EdgeDB.",
5-
"repository": "tahul/nuxt-edgedb",
66
"license": "MIT",
7-
"type": "module",
7+
"repository": "tahul/nuxt-edgedb",
88
"exports": {
99
".": {
1010
"types": "./dist/types.d.ts",
@@ -30,22 +30,22 @@
3030
},
3131
"dependencies": {
3232
"@edgedb/generate": "^0.4.1",
33-
"@nuxt/kit": "^3.8.1",
33+
"@nuxt/kit": "^3.8.2",
3434
"edgedb": "^1.4.1",
3535
"execa": "^8.0.1",
3636
"prompts": "^2.4.2"
3737
},
3838
"devDependencies": {
39+
"@antfu/eslint-config": "^2.1.0",
3940
"@nuxt/devtools": "latest",
40-
"@nuxt/eslint-config": "^0.2.0",
4141
"@nuxt/module-builder": "^0.5.4",
42-
"@nuxt/schema": "^3.8.1",
42+
"@nuxt/schema": "^3.8.2",
4343
"@nuxt/test-utils": "^3.8.1",
44-
"@types/node": "^20.9.0",
45-
"@types/prompts": "^2.4.8",
44+
"@types/node": "^20.9.4",
45+
"@types/prompts": "^2.4.9",
4646
"changelogen": "^0.5.5",
47-
"eslint": "^8.53.0",
48-
"nuxt": "^3.8.1",
47+
"eslint": "^8.54.0",
48+
"nuxt": "^3.8.2",
4949
"vitest": "^0.34.6"
5050
}
51-
}
51+
}

playground/app.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const links = computed(() => {
66
{
77
label: 'Home',
88
icon: 'i-heroicons-home',
9-
to: '/'
9+
to: '/',
1010
},
1111
]
1212
@@ -15,37 +15,37 @@ const links = computed(() => {
1515
{
1616
label: 'New blogpost',
1717
icon: 'i-heroicons-newspaper-20-solid',
18-
to: '/new'
18+
to: '/new',
1919
},
2020
{
2121
label: 'Logout',
2222
icon: 'i-heroicons-newspaper-20-solid',
23-
to: '/auth/logout'
24-
}
23+
to: '/auth/logout',
24+
},
2525
)
26-
} else {
26+
}
27+
else {
2728
links.push(
2829
{
2930
label: 'Register',
3031
icon: 'i-heroicons-key-20-solid',
31-
to: '/auth/signup'
32+
to: '/auth/signup',
3233
},
3334
{
3435
label: 'Login',
3536
icon: 'i-heroicons-lock-open-20-solid',
36-
to: '/auth/login'
37+
to: '/auth/login',
3738
},
3839
{
3940
label: 'Forgot my password',
4041
icon: 'i-heroicons-sparkles-20-solid',
41-
to: '/auth/forgot-password'
42+
to: '/auth/forgot-password',
4243
},
4344
)
4445
}
4546
4647
return links
4748
})
48-
4949
</script>
5050

5151
<template>

0 commit comments

Comments
 (0)