-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b153ac
commit b583cb7
Showing
40 changed files
with
2,115 additions
and
1,251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
root = true | ||
|
||
[*] | ||
indent_size = 4 | ||
indent_size = 2 | ||
indent_style = space | ||
end_of_line = lf | ||
charset = utf-8 | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
// Enable ESlint flat config support | ||
"eslint.experimental.useFlatConfig": true, | ||
// Disable auto formatting on save | ||
"editor.formatOnSave": false, | ||
// Enable ESLint on save | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "always" | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// @ts-check | ||
import { createConfigForNuxt } from '@nuxt/eslint-config/flat' | ||
|
||
export default createConfigForNuxt({ | ||
features: { | ||
tooling: true, | ||
stylistic: true, | ||
}, | ||
dirs: { | ||
src: ['./playground'], | ||
}, | ||
}).append({ | ||
rules: { | ||
'vue/no-multiple-template-root': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,12 +28,11 @@ | |
"dev:build": "nuxi build playground", | ||
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground", | ||
"lint": "eslint .", | ||
"fmt": "prettier --write .", | ||
"fmt:check": "prettier --check .", | ||
"types": "nuxi typecheck", | ||
"lint:fix": "eslint . --fix", | ||
"test": "vitest run", | ||
"test:watch": "vitest watch", | ||
"validate": "npm run fmt:check && npm run lint && npm run types && npm run test", | ||
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit", | ||
"validate": "npm run lint && npm run test:types && npm run test", | ||
"release": "npm run validate && npm run prepack && changelogen --release && npm publish && git push" | ||
}, | ||
"dependencies": { | ||
|
@@ -42,25 +41,22 @@ | |
}, | ||
"devDependencies": { | ||
"@nuxt/devtools": "latest", | ||
"@nuxt/eslint-config": "^0.2.0", | ||
"@nuxt/module-builder": "^0.5.5", | ||
"@nuxt/eslint-config": "^0.3.13", | ||
"@nuxt/module-builder": "^0.7.0", | ||
"@nuxt/schema": "^3.9.0", | ||
"@nuxt/test-utils": "^3.9.0", | ||
"@types/node": "^20.11.13", | ||
"changelogen": "^0.5.5", | ||
"eslint": "^8.56.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-prettier": "^5.0.0", | ||
"eslint": "^9.3.0", | ||
"h3": "^1.10.1", | ||
"nuxi": "^3.10.0", | ||
"nuxt": "^3.10.0", | ||
"prettier": "^3.0.3", | ||
"typescript": "^5.2.2", | ||
"typescript": "^5.4.5", | ||
"vite": "^4.4.9", | ||
"vitest": "^1.2.2", | ||
"vue": "^3.3.4", | ||
"vue-router": "^4.2.5", | ||
"vue-tsc": "^1.8.26" | ||
"vue-tsc": "^2.0.19" | ||
}, | ||
"packageManager": "[email protected]" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
import type { NuxtApp } from '#app'; | ||
import type { FetchContext } from 'ofetch'; | ||
import type { ConsolaInstance } from 'consola'; | ||
import { defineAppConfig } from '#imports'; | ||
import type { FetchContext } from 'ofetch' | ||
import type { ConsolaInstance } from 'consola' | ||
import type { NuxtApp } from '#app' | ||
import { defineAppConfig } from '#imports' | ||
|
||
export default defineAppConfig({ | ||
sanctum: { | ||
interceptors: { | ||
onRequest: async ( | ||
app: NuxtApp, | ||
ctx: FetchContext, | ||
logger: ConsolaInstance | ||
) => { | ||
logger.debug('custom onRequest interceptor'); | ||
}, | ||
sanctum: { | ||
interceptors: { | ||
onRequest: async ( | ||
app: NuxtApp, | ||
ctx: FetchContext, | ||
logger: ConsolaInstance, | ||
) => { | ||
logger.debug('custom onRequest interceptor') | ||
}, | ||
|
||
onResponse: async ( | ||
app: NuxtApp, | ||
ctx: FetchContext, | ||
logger: ConsolaInstance | ||
) => { | ||
logger.debug('custom onResponse interceptor'); | ||
}, | ||
}, | ||
onResponse: async ( | ||
app: NuxtApp, | ||
ctx: FetchContext, | ||
logger: ConsolaInstance, | ||
) => { | ||
logger.debug('custom onResponse interceptor') | ||
}, | ||
}, | ||
}); | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<template> | ||
<NuxtLayout> | ||
<NuxtPage /> | ||
</NuxtLayout> | ||
<NuxtLayout> | ||
<NuxtPage /> | ||
</NuxtLayout> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,39 @@ | ||
export default defineNuxtConfig({ | ||
devtools: { enabled: true }, | ||
ssr: true, | ||
typescript: { | ||
strict: true, | ||
typeCheck: true, | ||
}, | ||
devtools: { enabled: true }, | ||
ssr: true, | ||
typescript: { | ||
strict: true, | ||
typeCheck: true, | ||
}, | ||
|
||
modules: ['../src/module'], | ||
modules: ['../src/module'], | ||
|
||
sanctum: { | ||
baseUrl: 'http://localhost:80', | ||
runtimeConfig: { | ||
public: { | ||
sanctum: { | ||
logLevel: 5, | ||
redirect: { | ||
keepRequestedRoute: true, | ||
onAuthOnly: '/login', | ||
onGuestOnly: '/profile', | ||
onLogin: '/welcome', | ||
onLogout: '/logout', | ||
}, | ||
endpoints: { | ||
csrf: '/sanctum/csrf-cookie', | ||
login: '/api/login', | ||
logout: '/api/logout', | ||
user: '/api/user', | ||
}, | ||
globalMiddleware: { | ||
allow404WithoutAuth: true, | ||
enabled: false, | ||
}, | ||
}, | ||
}, | ||
}, | ||
|
||
sanctum: { | ||
baseUrl: 'http://localhost:80', | ||
redirect: { | ||
keepRequestedRoute: true, | ||
onAuthOnly: '/login', | ||
onGuestOnly: '/profile', | ||
onLogin: '/welcome', | ||
onLogout: '/logout', | ||
}, | ||
endpoints: { | ||
csrf: '/sanctum/csrf-cookie', | ||
login: '/api/login', | ||
logout: '/api/logout', | ||
user: '/api/user', | ||
}, | ||
globalMiddleware: { | ||
allow404WithoutAuth: true, | ||
enabled: false, | ||
}, | ||
}); | ||
}, | ||
}) |
Oops, something went wrong.