Skip to content

Commit

Permalink
chore: eslint 配置更新
Browse files Browse the repository at this point in the history
  • Loading branch information
ronger-x committed Apr 29, 2024
1 parent e6d236b commit 4373551
Show file tree
Hide file tree
Showing 11 changed files with 81 additions and 119 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"root": true,
"extends": ["@roshan-labs/eslint-config"]
"extends": ["@nuxt/eslint-config"]
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@
"devDependencies": {
"@auth/core": "0.27.0",
"@nuxt/devtools": "^1.1.5",
"@nuxt/eslint-config": "^0.3.6",
"@nuxt/module-builder": "^0.5.5",
"@nuxt/schema": "^3.11.2",
"@nuxt/test-utils": "^3.12.1",
"@roshan-labs/eslint-config": "^1.4.1",
"@types/jsonwebtoken": "^9.0.5",
"@types/node": "^20.12.7",
"changelogen": "^0.5.5",
Expand All @@ -80,4 +80,4 @@
"peerDependencies": {
"@auth/core": "0.20.0"
}
}
}
24 changes: 16 additions & 8 deletions playground-authjs/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,24 @@
</div>
<div>
<h3>Actions</h3>
<button @click="signIn('github')">sign in github</button>
<br />
<button @click="signIn(undefined)">sign in</button>
<br />
<button @click="signIn('no-provider')">no provider</button>
<br />
<button @click="signOut()">sign out</button>
<button @click="signIn('github')">
sign in github
</button>
<br>
<button @click="signIn(undefined)">
sign in
</button>
<br>
<button @click="signIn('no-provider')">
no provider
</button>
<br>
<button @click="signOut()">
sign out
</button>
</div>
{{ sessionData }}
<nuxt-page></nuxt-page>
<nuxt-page />
</div>
</template>

Expand Down
2 changes: 1 addition & 1 deletion playground-authjs/pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<template>
<div></div>
<div />
</template>
2 changes: 1 addition & 1 deletion playground-local/app.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<nuxt-page></nuxt-page>
<nuxt-page />
</template>

<style>
Expand Down
4 changes: 3 additions & 1 deletion playground-local/pages/forbidden.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<template>
<div>
<h1>Forbidden</h1>
<nuxt-link to="/">Back home</nuxt-link>
<nuxt-link to="/">
Back home
</nuxt-link>
</div>
</template>
26 changes: 20 additions & 6 deletions playground-local/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,31 @@
<div>
<h3>Pages</h3>
<ul>
<li><nuxt-link to="/no-permission">No permission</nuxt-link></li>
<li>
<nuxt-link to="/no-permission">
No permission
</nuxt-link>
</li>
</ul>
<h3>Permissions</h3>
<div>
<button v-permission="'add'">Add</button>
<button v-permission="'edit'">Edit</button>
<button v-permission="'delete'">Delete</button>
<button v-permission="['no-permission']">Can't see me</button>
<button v-permission="'add'">
Add
</button>
<button v-permission="'edit'">
Edit
</button>
<button v-permission="'delete'">
Delete
</button>
<button v-permission="['no-permission']">
Can't see me
</button>
</div>
<h3>Sign out</h3>
<button @click="logout">Sign Out</button>
<button @click="logout">
Sign Out
</button>
</div>
</div>
</template>
Expand Down
16 changes: 13 additions & 3 deletions playground-local/pages/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,22 @@
<h1>Login</h1>
<form @submit.prevent="login">
<div>
<input v-model="username" type="text" placeholder="Username" />
<input
v-model="username"
type="text"
placeholder="Username"
>
</div>
<div>
<input v-model="password" type="password" placeholder="Password" />
<input
v-model="password"
type="password"
placeholder="Password"
>
</div>
<button type="submit">login</button>
<button type="submit">
login
</button>
</form>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion playground-refresh/app.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<template>
<nuxt-page></nuxt-page>
<nuxt-page />
</template>
26 changes: 20 additions & 6 deletions playground-refresh/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,30 @@
<template v-if="status === 'unauthenticated'">
<h3>Login</h3>
<form @submit.prevent="login">
<input v-model="loginModel.username" type="text" placeholder="Username" />
<input v-model="loginModel.password" type="password" placeholder="Password" />
<button type="submit">login</button>
<input
v-model="loginModel.username"
type="text"
placeholder="Username"
>
<input
v-model="loginModel.password"
type="password"
placeholder="Password"
>
<button type="submit">
login
</button>
</form>
</template>

<h3>Actions</h3>
<button @click="signOut()">Sign out</button>
<br />
<button @click="doRefreshToken()">Refresh token</button>
<button @click="signOut()">
Sign out
</button>
<br>
<button @click="doRefreshToken()">
Refresh token
</button>
</div>
</div>
</template>
Expand Down
92 changes: 3 additions & 89 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4373551

Please sign in to comment.